Commit 651f81e8 authored by Luca Boccassi's avatar Luca Boccassi Committed by GitHub

Merge pull request #2362 from nexcvon/patch-2

Problem: zmq::signaler_t::send may loop forever
parents 70a7756d 9624f9ad
...@@ -189,6 +189,7 @@ void zmq::signaler_t::send () ...@@ -189,6 +189,7 @@ void zmq::signaler_t::send ()
unsigned char dummy = 0; unsigned char dummy = 0;
while (true) { while (true) {
int nbytes = ::send (w, (char*) &dummy, sizeof (dummy), 0); int nbytes = ::send (w, (char*) &dummy, sizeof (dummy), 0);
wsa_assert (nbytes != SOCKET_ERROR);
if (unlikely (nbytes == SOCKET_ERROR)) if (unlikely (nbytes == SOCKET_ERROR))
continue; continue;
zmq_assert (nbytes == sizeof (dummy)); zmq_assert (nbytes == sizeof (dummy));
......
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