Problem: poller item fd uninitialized

Solution: Set to zero for socket events
parent 7b1fef28
......@@ -447,6 +447,7 @@ int zmq::socket_poller_t::check_events (zmq::socket_poller_t::event_t *events_,
if (it->events & events) {
events_[found].socket = it->socket;
events_[found].fd = 0;
events_[found].user_data = it->user_data;
events_[found].events = it->events & events;
++found;
......@@ -483,8 +484,8 @@ int zmq::socket_poller_t::check_events (zmq::socket_poller_t::event_t *events_,
if (events) {
events_[found].socket = NULL;
events_[found].user_data = it->user_data;
events_[found].fd = it->fd;
events_[found].user_data = it->user_data;
events_[found].events = events;
++found;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment