mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-10 07:56:09 +00:00
issue 32 - poll_t poller broken
This commit is contained in:
parent
7a29e8594f
commit
604f7475ec
23
src/poll.cpp
23
src/poll.cpp
@ -165,22 +165,21 @@ void zmq::poll_t::loop ()
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (pollset_t::iterator it = pollset.begin ();
|
for (pollset_t::size_type i = 0; i != pollset.size (); i++) {
|
||||||
it != pollset.end (); it ++) {
|
|
||||||
|
|
||||||
zmq_assert (!(it->revents & POLLNVAL));
|
zmq_assert (!(pollset [i].revents & POLLNVAL));
|
||||||
if (it->fd == retired_fd)
|
if (pollset [i].fd == retired_fd)
|
||||||
continue;
|
continue;
|
||||||
if (it->revents & (POLLERR | POLLHUP))
|
if (pollset [i].revents & (POLLERR | POLLHUP))
|
||||||
fd_table [it->fd].events->in_event ();
|
fd_table [pollset [i].fd].events->in_event ();
|
||||||
if (it->fd == retired_fd)
|
if (pollset [i].fd == retired_fd)
|
||||||
continue;
|
continue;
|
||||||
if (it->revents & POLLOUT)
|
if (pollset [i].revents & POLLOUT)
|
||||||
fd_table [it->fd].events->out_event ();
|
fd_table [pollset [i].fd].events->out_event ();
|
||||||
if (it->fd == retired_fd)
|
if (pollset [i].fd == retired_fd)
|
||||||
continue;
|
continue;
|
||||||
if (it->revents & POLLIN)
|
if (pollset [i].revents & POLLIN)
|
||||||
fd_table [it->fd].events->in_event ();
|
fd_table [pollset [i].fd].events->in_event ();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clean up the pollset and update the fd_table accordingly.
|
// Clean up the pollset and update the fd_table accordingly.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user