mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-20 10:23:47 +00:00
fixed zmq assertion in signaler.cpp under ubuntu
This commit is contained in:
parent
2452c598b7
commit
e9e03f5ade
@ -289,6 +289,10 @@ void zmq::signaler_t::recv ()
|
|||||||
#if defined ZMQ_HAVE_EVENTFD
|
#if defined ZMQ_HAVE_EVENTFD
|
||||||
uint64_t dummy;
|
uint64_t dummy;
|
||||||
ssize_t sz = read (r, &dummy, sizeof (dummy));
|
ssize_t sz = read (r, &dummy, sizeof (dummy));
|
||||||
|
if (sz == -1) {
|
||||||
|
errno_assert (errno == EAGAIN);
|
||||||
|
}
|
||||||
|
else {
|
||||||
errno_assert (sz == sizeof (dummy));
|
errno_assert (sz == sizeof (dummy));
|
||||||
|
|
||||||
// If we accidentally grabbed the next signal(s) along with the current
|
// If we accidentally grabbed the next signal(s) along with the current
|
||||||
@ -301,6 +305,7 @@ void zmq::signaler_t::recv ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
zmq_assert (dummy == 1);
|
zmq_assert (dummy == 1);
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
unsigned char dummy;
|
unsigned char dummy;
|
||||||
#if defined ZMQ_HAVE_WINDOWS
|
#if defined ZMQ_HAVE_WINDOWS
|
||||||
|
Loading…
x
Reference in New Issue
Block a user