Commit 72a94881 authored by Pieter Hintjens's avatar Pieter Hintjens

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

on Windows, handle WSAENOBUFS like WSAEWOULDBLOCK
parents adafdb8f 8339271a
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment