Commit d11f501d authored by KIU Shueng Chuan's avatar KIU Shueng Chuan

problem: not using official api FD_ZERO to init fd_set

solution: fix it

In particular, on Windows, using FD_ZERO is much more efficient than
zeroing out the whole structure.
parent 0a66acb3
......@@ -1048,9 +1048,12 @@ int zmq_poll (zmq_pollitem_t *items_, int nitems_, long timeout_)
// file descriptors.
zmq_assert (nitems_ <= FD_SETSIZE);
fd_set pollset_in = { 0 };
fd_set pollset_out = { 0 };
fd_set pollset_err = { 0 };
fd_set pollset_in;
FD_ZERO (&pollset_in);
fd_set pollset_out;
FD_ZERO (&pollset_out);
fd_set pollset_err;
FD_ZERO (&pollset_err);
zmq::fd_t maxfd = 0;
......
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