fix bug with isReadyToWrite

This commit is contained in:
Benjamin Sergeant
2019-03-18 22:00:08 -07:00
parent bbc0e2106c
commit 13f4aee5ee
5 changed files with 24 additions and 20 deletions

View File

@ -205,14 +205,14 @@ namespace ix
// Wait with a 10ms timeout until the socket is ready to write.
// This way we are not busy looping
PollResultType result = _socket->isReadyToWrite(10);
if (result == PollResultType_Error)
{
_socket->close();
setReadyState(CLOSED);
break;
}
// FIXME: why are we not getting PollResultType_ReadyForWrite ??
else // if (result == PollResultType_ReadyForWrite)
else if (result == PollResultType_ReadyForWrite)
{
sendOnSocket();
}