mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-02 20:30:14 +01:00
Unspecified error code from mailbox_t::recv on Win32 fixed
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
This commit is contained in:
parent
a28928fe37
commit
10a93bb79f
@ -127,8 +127,10 @@ int zmq::mailbox_t::recv (command_t *cmd_, int timeout_)
|
|||||||
|
|
||||||
// Attempt to read an entire command.
|
// Attempt to read an entire command.
|
||||||
int nbytes = ::recv (r, (char*) cmd_, sizeof (command_t), 0);
|
int nbytes = ::recv (r, (char*) cmd_, sizeof (command_t), 0);
|
||||||
if (nbytes == -1 && WSAGetLastError () == WSAEWOULDBLOCK)
|
if (nbytes == -1 && WSAGetLastError () == WSAEWOULDBLOCK) {
|
||||||
|
errno = EAGAIN;
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
// Sanity check for success.
|
// Sanity check for success.
|
||||||
wsa_assert (nbytes != SOCKET_ERROR);
|
wsa_assert (nbytes != SOCKET_ERROR);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user