• R/O
  • SSH

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#objective-cqt誰得cocoawindowspythonrubyphpgameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwittertestdombtronvb.netdirectxarduinopreviewerゲームエンジン

This is a fork of Zandronum for TSPG.


Commit MetaInfo

Revisiónad04991924ef3efbbc23415428a4a52d22e9c2be (tree)
Tiempo2018-11-03 23:32:06
AutorSean Baggaley <sean@csnx...>
CommiterSean Baggaley

Log Message

Undo that, ignore eagain

Cambiar Resumen

Diferencia incremental

diff -r 8b3022a981ec -r ad04991924ef src/tspg_dnsbl.cpp
--- a/src/tspg_dnsbl.cpp Sat Nov 03 14:21:26 2018 +0000
+++ b/src/tspg_dnsbl.cpp Sat Nov 03 14:32:06 2018 +0000
@@ -90,14 +90,21 @@
9090 addr.sun_family = AF_UNIX;
9191 strncpy(addr.sun_path, socketAddress, sizeof(addr.sun_path) - 1);
9292
93- if (connect(sock, (struct sockaddr *) &addr, sizeof(addr)) == -1) {
94- Printf("Failed to connect to socket %s: (%d) %s.\n", socketAddress, errno, strerror(errno));
95- return;
96- }
97-
9893 int flags = fcntl(sock, F_GETFL, 0);
9994 fcntl(sock, F_SETFL, flags | O_NONBLOCK);
10095
96+ if (connect(sock, (struct sockaddr *) &addr, sizeof(addr)) == -1) {
97+ if (errno == EAGAIN || errno == EWOULDBLOCK)
98+ {
99+ // do nothing
100+ }
101+ else
102+ {
103+ Printf("Failed to connect to socket %s: (%d) %s.\n", socketAddress, errno, strerror(errno));
104+ return;
105+ }
106+ }
107+
101108 isConnected = true;
102109 sendFail = false;
103110 }