[zeromq-dev] Issue 504: Assertion failed at tcp_listener.cpp:58 (Win, WM)
boris at boressoft.ru
Wed Feb 6 11:16:41 CET 2013
I believe, it is a bug in 2.x branch.
Issue in JIRA here:
Pull request here:
Description of an issue:
Imagine we have lost connection to other side. libzmq starts reconnect
First connection attempt (made by zmq_connecter_t::start_connecting)
calls tcp_connecter_t::open. Call to ::connect was unsuccessful (for
example, we've got WSAECONNREFUSED = port is closed). In this case
execution will pass to the end of tcp_connecter_t::open and we will have
ECONNREFUSED in errno variable.
In zmq_connecter_t::start_connecting, where we will return from
tcp_connecter_t::open, execution will also pass to the end of it and
reconnect timer will be activated.
When time arrives zmq_connecter_t::timer_event will be called, that
itself will call zmq_connecter_t::start_connecting from which
tcp_connecter.open will be called. But this time we will have actual
socked ID in s variable because it was not closed after previous
In 3.x branch there is no such error because at the end of
start_connections (just before enabling reconnect timer) close() method
is called. Same should be done in 2.x branch.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 260 bytes
Desc: OpenPGP digital signature
More information about the zeromq-dev