[zeromq-dev] Terminating before receiving reply on ZMQ_REQ?
Ian Barber
ian.barber at gmail.com
Tue Jun 19 11:39:52 CEST 2012
On Mon, Jun 18, 2012 at 11:50 PM, Andrei Zmievski <andrei at zmievski.org>wrote:
> I have a system with a client and a server, communicating via ZeroMQ.
> Client uses ZMQ_REQ socket to send requests to the server, which replies on
> ZMQ_REP socket. Sometimes though, I need to terminate and exit early,
> before even attempting to receive the reply, but I find that my client
> blocks for several seconds before finally exiting. I assume this is because
> the context is waiting on the outstanding reply message? I specified LINGER
> option as 0, but it's not helping.
>
> -Andrei
>
Could you post up the snippet of code that demonstrates the issue? One
thing to check: is LINGER set after the connection is made - it must be set
before a given connection to effect it. (so setsockopt(), connect(), rather
than connect(), setsockopt()).
Ian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120619/40d71fdb/attachment.htm>
More information about the zeromq-dev
mailing list