[zeromq-dev] zmq_recv Blocks Forever
wolf at cs.cmu.edu
Sun Aug 22 19:42:51 CEST 2010
It seems as if this is not always reproducible.
I think what is happening is the "Hello" message gets sent to the server
in some cases, then the server never sends a response (it was killed),
and the client is left looking for a response.
Other times, the server is killed before the client sends the "Hello"
message, so when the server comes back it sends this message and then
works properly again.
This is a valid error condition right?
On Sun, 2010-08-22 at 13:17 -0400, Wolfgang Richter wrote:
> I was wondering if this was expected behavior.
> Working with the REQ-REP Hello World example in C with 0MQ release
> 2.0.7(beta), I have noticed that zmq_recv in my client will block
> forever if I kill the server prematurely.
> Even if I bring the server back up.
> I was expecting that once the server came back, the client would
> continue, or somehow signal an error condition (or an error condition on
> the server).
> I have noticed that if I use ZMQ_NOBLOCK on my zmq_recv and loop
> whenever I get errors, when the server comes back up things continue
> making progress as expected.
More information about the zeromq-dev