mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-12 18:40:27 +01:00
LIBZMQ-195 on Windows, handle WSAENOBUFS like WSAEWOULDBLOCK
This commit is contained in:
parent
6ab66ca51a
commit
8339271a3e
@ -173,6 +173,11 @@ int zmq::tcp_write (fd_t s_, const void *data_, size_t size_)
|
||||
WSAGetLastError () == WSAECONNRESET))
|
||||
return -1;
|
||||
|
||||
// Circumvent a Windows bug; see https://support.microsoft.com/en-us/kb/201213
|
||||
// and https://zeromq.jira.com/browse/LIBZMQ-195
|
||||
if (nbytes == SOCKET_ERROR && WSAGetLastError() == WSAENOBUFS)
|
||||
return 0;
|
||||
|
||||
wsa_assert (nbytes != SOCKET_ERROR);
|
||||
return nbytes;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user