mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-19 01:43:50 +00:00
zmq_poll (select version) now correctly assumes that ZMQ_FD is edge-trigerred
This commit is contained in:
parent
f49b77eedc
commit
4d51a52874
@ -569,12 +569,6 @@ int zmq_poll (zmq_pollitem_t *items_, int nitems_, long timeout_)
|
|||||||
// The poll item is a 0MQ socket. Retrieve pending events
|
// The poll item is a 0MQ socket. Retrieve pending events
|
||||||
// using the ZMQ_EVENTS socket option.
|
// using the ZMQ_EVENTS socket option.
|
||||||
if (items_ [i].socket) {
|
if (items_ [i].socket) {
|
||||||
size_t zmq_fd_size = sizeof (zmq::fd_t);
|
|
||||||
zmq::fd_t notify_fd;
|
|
||||||
if (zmq_getsockopt (items_ [i].socket, ZMQ_FD, ¬ify_fd,
|
|
||||||
&zmq_fd_size) == -1)
|
|
||||||
return -1;
|
|
||||||
if (FD_ISSET (notify_fd, &inset)) {
|
|
||||||
size_t zmq_events_size = sizeof (uint32_t);
|
size_t zmq_events_size = sizeof (uint32_t);
|
||||||
uint32_t zmq_events;
|
uint32_t zmq_events;
|
||||||
if (zmq_getsockopt (items_ [i].socket, ZMQ_EVENTS, &zmq_events,
|
if (zmq_getsockopt (items_ [i].socket, ZMQ_EVENTS, &zmq_events,
|
||||||
@ -587,7 +581,6 @@ int zmq_poll (zmq_pollitem_t *items_, int nitems_, long timeout_)
|
|||||||
(zmq_events & ZMQ_POLLIN))
|
(zmq_events & ZMQ_POLLIN))
|
||||||
items_ [i].revents |= ZMQ_POLLIN;
|
items_ [i].revents |= ZMQ_POLLIN;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// Else, the poll item is a raw file descriptor, simply convert
|
// Else, the poll item is a raw file descriptor, simply convert
|
||||||
// the events to zmq_pollitem_t-style format.
|
// the events to zmq_pollitem_t-style format.
|
||||||
else {
|
else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user