the send blocks if both rmask and wmask are set so only do it if rmask is not set

This commit is contained in:
Douglas Clowes
2013-05-24 12:38:02 +10:00
parent 8e245ba4be
commit 3c3afb92c8

View File

@ -803,7 +803,7 @@ int NETReconnectWithFlags(mkChannel * self, int flags)
if (iRet <= 0)
iRet = -1; /* failure */
}
if (FD_ISSET(self->sockid, &wmask)) {
else if (FD_ISSET(self->sockid, &wmask)) {
iRet = send(self->sockid, NULL, 0, 0);
if (iRet < 0)
iRet = -1; /* failure */