mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-15 23:20:09 +02:00
Merge pull request #2362 from nexcvon/patch-2
Problem: zmq::signaler_t::send may loop forever
This commit is contained in:
@@ -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));
|
||||||
|
Reference in New Issue
Block a user