summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/xszmq.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/xszmq.cpp b/src/xszmq.cpp
index 21db52c..d54920b 100644
--- a/src/xszmq.cpp
+++ b/src/xszmq.cpp
@@ -379,7 +379,8 @@ int zmq_recv (void *s, zmq_msg_t *msg, int flags)
int zmq_poll (zmq_pollitem_t *items, int nitems, long timeout)
{
- return xs_poll ((xs_pollitem_t*) items, nitems, (int) (timeout / 1000));
+ return xs_poll ((xs_pollitem_t*) items, nitems,
+ timeout < 0 ? -1 : (int) (timeout / 1000));
}
int zmq_device (int device, void *frontend, void *backend)