diff options
Diffstat (limited to 'src/select.cpp')
-rw-r--r-- | src/select.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/select.cpp b/src/select.cpp index 56f9f74..35d8bd8 100644 --- a/src/select.cpp +++ b/src/select.cpp @@ -159,12 +159,13 @@ void zmq::select_t::loop () // Wait for events. struct timeval tv = {(long) (timeout / 1000), (long) (timeout % 1000 * 1000)}; - int rc = select (maxfd + 1, &readfds, &writefds, &exceptfds, - timeout ? &tv : NULL); - #ifdef ZMQ_HAVE_WINDOWS + int rc = select (0, &readfds, &writefds, &exceptfds, + timeout ? &tv : NULL); wsa_assert (rc != SOCKET_ERROR); #else + int rc = select (maxfd + 1, &readfds, &writefds, &exceptfds, + timeout ? &tv : NULL); if (rc == -1 && errno == EINTR) continue; errno_assert (rc != -1); |