check select errors better

This commit is contained in:
Benjamin Sergeant
2019-01-07 11:18:00 -08:00
parent 39140ef98c
commit 1fa75d7fb2
5 changed files with 55 additions and 43 deletions

View File

@ -158,9 +158,8 @@ namespace ix
{
int N = (int) _rxbuf.size();
int ret;
_rxbuf.resize(N + 1500);
ret = _socket->recv((char*)&_rxbuf[0] + N, 1500);
ssize_t ret = _socket->recv((char*)&_rxbuf[0] + N, 1500);
if (ret < 0 && (_socket->getErrno() == EWOULDBLOCK ||
_socket->getErrno() == EAGAIN)) {