Only check write-timeouts when we have something to write.

This commit is contained in:
Ferdi Franceschini
2014-05-05 14:10:16 +10:00
parent d7acb7c16c
commit 3571578531

View File

@ -406,6 +406,8 @@ void ANETprocess(void)
GetRWBufferData(connections[i].writeBuffer, &length); GetRWBufferData(connections[i].writeBuffer, &length);
if (length > 0) if (length > 0)
FD_SET(socke, &writeMask); FD_SET(socke, &writeMask);
else
connections[i].lastOpenForWrite = time(NULL);
} }
if (socke > count) { if (socke > count) {
count = socke; count = socke;