mirror of
https://github.com/zeromq/libzmq.git
synced 2025-01-19 00:46:05 +01:00
Merge pull request #1471 from reunanen/retry-on-WSAENOBUFS
on Windows, handle WSAENOBUFS like WSAEWOULDBLOCK
This commit is contained in:
commit
72a94881de
@ -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…
x
Reference in New Issue
Block a user