[zeromq-dev] zmq_poll() and ZMQ_REP/ZMQ_REQ sockets

Martin Sustrik sustrik at 250bpm.com
Tue Jan 12 08:17:40 CET 2010

Hi Kamil,

> I am getting crashes when trying to use zmq_poll() on ZMQ_REP and
> ZMQ_REQ at the same time. It is working if a poll item passed with
> ZMQ_REP socket (ZMQ_POLLIN and ZMQ_POLLOUT flags set). It crashes when
> passing ZMQ_REQ socket with ZMQ_POLLIN flag set. I attached a simple
> test app that reproduces the error.
> Has a ZMQ socket to be bound/connected before calling zmq_poll()?

The bug is fixed in trunk (rev. bcd278a). The problem was that the case 
where socket is not waiting for a reply (i.e. no request was sent) was 
not handled in zmq_poll correctly.


More information about the zeromq-dev mailing list