mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-13 10:52:56 +01:00
Merge pull request #2147 from goodfella/fix-zmq-poller-poll-return
Fix zmq poller poll return
This commit is contained in:
commit
88e4cff948
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user