Merge pull request #1471 from reunanen/retry-on-WSAENOBUFS

on Windows, handle WSAENOBUFS like WSAEWOULDBLOCK
This commit is contained in:
Pieter Hintjens 2015-07-07 21:51:36 +02:00
commit 72a94881de

View File

@ -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;