Problem: zmq::signaler_t::send may loop forever

Solution: restore the wsa_assert statement previously removed.
This commit is contained in:
nexcvon 2017-03-06 21:55:30 +08:00 committed by GitHub
parent bcf75777c8
commit 9624f9ade7

View File

@ -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));