[zeromq-dev] [PATCH] Minor patch for xrep_t::xhas_in()

Martin Sustrik sustrik at 250bpm.com
Fri May 6 07:11:19 CEST 2011

Hi Tore,

> I'm getting some errors when shutting down my program right now -
> looks like the problem is in
> xrep_t::xhas_in(). I can enter this function when current_in>= inpipes.size().
> Now, I'm not quite sure what this function does, so the contition
> could be an indication
> that something else is wrong, anyway...

The function checks whether the socket is ready for reading (used 
withing zmq_poll and ZMQ_EVENTS).

current_in points to the pipe (which represents underlying TCP 
connection) that is scheduled to be read from. It should never be 
greater than inpipes.size().

We should have a look why that happens in the first place. Do you have a 
test case to reproduce the problem?


More information about the zeromq-dev mailing list