Commit 34be53d8 authored by Luca Boccassi's avatar Luca Boccassi Committed by GitHub

Merge pull request #2360 from nexcvon/patch-2

Problem: Assertion failed in zmq::signaler_t::send
parents 07d904a2 bcf75777
...@@ -187,9 +187,13 @@ void zmq::signaler_t::send () ...@@ -187,9 +187,13 @@ void zmq::signaler_t::send ()
errno_assert (sz == sizeof (inc)); errno_assert (sz == sizeof (inc));
#elif defined ZMQ_HAVE_WINDOWS #elif defined ZMQ_HAVE_WINDOWS
unsigned char dummy = 0; unsigned char dummy = 0;
int nbytes = ::send (w, (char *) &dummy, sizeof (dummy), 0); while (true) {
wsa_assert (nbytes != SOCKET_ERROR); int nbytes = ::send (w, (char*) &dummy, sizeof (dummy), 0);
zmq_assert (nbytes == sizeof (dummy)); if (unlikely (nbytes == SOCKET_ERROR))
continue;
zmq_assert (nbytes == sizeof (dummy));
break;
}
#else #else
unsigned char dummy = 0; unsigned char dummy = 0;
while (true) { while (true) {
......
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