[zeromq-dev] Possible zpoller issue

Luca Boccassi luca.boccassi at gmail.com
Sat Sep 16 10:55:32 CEST 2017


On Sat, 2017-09-16 at 10:02 +0300, Doron Somech wrote:
> I'm guessing you are building libzmq from master including draft?
> 
> I think the return value from zmq_poller_wait changed to EAGAIN on
> time
> out. CZMQ is still checking for ETIMEDOUT. We should fix CZMQ to
> check for
> either.
> 
> https://github.com/zeromq/czmq/blob/master/src/zpoller.c#L233

https://github.com/zeromq/czmq/pull/1760

> On Sep 16, 2017 06:53, "Justin Azoff" <justin.azoff at gmail.com> wrote:
> 
> > Am I doing something wrong with zpoller here, or is this a bug?
> > 
> > #include "czmq_library.h"
> > 
> > int main(int argc, char **argv)
> > {
> > 
> >     zsock_t * sock =  zsock_new (ZMQ_DEALER);
> >     zsock_connect(sock, "tcp://172.0.0.1:9999");
> >     zpoller_t *poller = zpoller_new (NULL);
> >     if(zpoller_add (poller, sock)) {
> >         zsys_debug("add failed?!?");
> >     }
> >     zsys_debug("Polling...");
> >     void *ret = zpoller_wait (poller, 3000);
> >     zsys_debug("Done.");
> >     zsys_debug("zpoller_wait() is %s", ret ? "not null" : "null");
> > 
> >     zsys_debug("zpoller_expired() is %s", zpoller_expired(poller) ?
> > "true" : "false");
> >     zsys_debug("zpoller_terminated() is %s",
> > zpoller_terminated(poller) ? "true" : "false");
> >     zsock_destroy(&sock);
> > 
> > }
> > 
> >  $ make && ./poll
> > make: Nothing to be done for `all'.
> > D: 17-09-15 22:49:23 Polling...
> > D: 17-09-15 22:49:26 Done.
> > D: 17-09-15 22:49:26 zpoller_wait() is null
> > D: 17-09-15 22:49:26 zpoller_expired() is false
> > D: 17-09-15 22:49:26 zpoller_terminated() is false
> > 
> > I was expecting expired to return True.
> > 
> > 
> > 
> > --
> > - Justin
> > _______________________________________________
> > zeromq-dev mailing list
> > zeromq-dev at lists.zeromq.org
> > https://lists.zeromq.org/mailman/listinfo/zeromq-dev
> > 
> 
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20170916/fef9adc3/attachment.sig>


More information about the zeromq-dev mailing list