diff options
-rw-r--r-- | src/zmq.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/zmq.cpp b/src/zmq.cpp index e93f8b7..c30a6aa 100644 --- a/src/zmq.cpp +++ b/src/zmq.cpp @@ -539,7 +539,7 @@ int zmq_poll (zmq_pollitem_t *items_, int nitems_, long timeout_) memcpy (&inset, &pollset_in, sizeof (fd_set)); memcpy (&outset, &pollset_out, sizeof (fd_set)); memcpy (&errset, &pollset_err, sizeof (fd_set)); - int rc = select (maxfd, &inset, &outset, &errset, + int rc = select (maxfd + 1, &inset, &outset, &errset, first_pass ? &zero_timeout : (timeout_ < 0 ? NULL : &timeout)); #if defined ZMQ_HAVE_WINDOWS wsa_assert (rc != SOCKET_ERROR); |