Fix for windows (#50)

This commit is contained in:
Dimon4eg
2019-05-06 19:13:42 +03:00
committed by Benjamin Sergeant
parent 28a7ec4f35
commit 4d83dab4f3
5 changed files with 29 additions and 17 deletions

View File

@ -296,8 +296,7 @@ namespace ix
{
ssize_t ret = _socket->recv((char*)&_readbuf[0], _readbuf.size());
if (ret < 0 && (_socket->getErrno() == EWOULDBLOCK ||
_socket->getErrno() == EAGAIN))
if (ret < 0 && Socket::isWaitNeeded())
{
break;
}
@ -844,8 +843,7 @@ namespace ix
{
ssize_t ret = _socket->send((char*)&_txbuf[0], _txbuf.size());
if (ret < 0 && (_socket->getErrno() == EWOULDBLOCK ||
_socket->getErrno() == EAGAIN))
if (ret < 0 && Socket::isWaitNeeded())
{
break;
}