Skip to content

Commit

Permalink
Merge pull request #2362 from nexcvon/patch-2
Browse files Browse the repository at this point in the history
Problem: zmq::signaler_t::send may loop forever
  • Loading branch information
bluca authored Mar 6, 2017
2 parents 70a7756 + 9624f9a commit 651f81e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/signaler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ void zmq::signaler_t::send ()
unsigned char dummy = 0;
while (true) {
int nbytes = ::send (w, (char*) &dummy, sizeof (dummy), 0);
wsa_assert (nbytes != SOCKET_ERROR);
if (unlikely (nbytes == SOCKET_ERROR))
continue;
zmq_assert (nbytes == sizeof (dummy));
Expand Down

0 comments on commit 651f81e

Please sign in to comment.