[zeromq-dev] [bug+workaround] socket_t not closed properly, still used
Martin Sustrik
sustrik at 250bpm.com
Fri Jan 21 13:13:17 CET 2011
Hi Thijs,
> Perhaps this workaround it not ideal for when you want to have your
> old socket linger longer, but for me it's important to close it.
Yes. The problem with the workaround is that the creation of next socket
could then block for indefinite time (until all the pending messages are
sent).
> The consequence of having two sockets open, is that the when you load
> balance between several sockets, the zombie socket also seems to get
> used. So I suspect the *real solution* will be to make sure the zombie
> socket doesn't get used anymore. For me removing the zombie socket is
> a good workaround for now.
So, the socket is zmq_close()'d but it takes some time to actually
destruct it. Untill then the connection to the peer still exists and the
peer still sends messages to the closed socket. Do I understand it right?
Martin
More information about the zeromq-dev
mailing list