Commit 88e4cff9 authored by Luca Boccassi's avatar Luca Boccassi Committed by GitHub

Merge pull request #2147 from goodfella/fix-zmq-poller-poll-return

Fix zmq poller poll return
parents 6c166937 ffdb44ad
......@@ -31,6 +31,11 @@
#include "macros.hpp"
#include <string.h>
#ifndef ZMQ_HAVE_WINDOWS
#include <unistd.h>
#endif
#include <new>
#include <sstream>
......
......@@ -842,7 +842,7 @@ inline int zmq_poller_poll (zmq_pollitem_t *items_, int nitems_, long timeout_)
}
// Cleanup
rc = zmq_poller_destroy (&poller);
zmq_poller_destroy (&poller);
delete [] events;
return rc;
}
......
......@@ -167,7 +167,7 @@ int main (void)
{ dish, 0, ZMQ_POLLIN, 0 }, // read subscriptions
};
rc = zmq_poll(items, 2, 2000);
assert (rc == 0);
assert (rc == 1);
assert (items[1].revents == ZMQ_POLLIN);
// Check the correct message arrived
......
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