Cygwin: AF_INET and AF_LOCAL: recv_internal: fix MSG_WAITALL support
If MSG_WAITALL is set, recv_internal calls WSARecv or WSARecvFrom in a loop, in an effort to fill all the scatter-gather buffers. The test for whether all the buffers are full was previously incorrect.
This commit is contained in:
parent
0c3c451ae3
commit
3752ab804b
|
@ -1208,7 +1208,7 @@ fhandler_socket_inet::recv_internal (LPWSAMSG wsamsg, bool use_recvmsg)
|
|||
--wsacnt;
|
||||
}
|
||||
}
|
||||
if (!wret)
|
||||
if (!wsacnt)
|
||||
break;
|
||||
}
|
||||
else if (WSAGetLastError () != WSAEWOULDBLOCK)
|
||||
|
|
|
@ -1212,7 +1212,7 @@ fhandler_socket_local::recv_internal (LPWSAMSG wsamsg, bool use_recvmsg)
|
|||
--wsacnt;
|
||||
}
|
||||
}
|
||||
if (!wret)
|
||||
if (!wsacnt)
|
||||
break;
|
||||
}
|
||||
else if (WSAGetLastError () != WSAEWOULDBLOCK)
|
||||
|
|
Loading…
Reference in New Issue