mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-27 11:06:52 +01:00
Problem: connecter classes do not handle ZMQ_RECONNECT_IVL of -1 (#3163)
* Problem: connecter classes do not handle ZMQ_RECONNECT_IVL of -1 Solution: Add guards to prevent a reconnect timer from starting if ZMQ_RECONNECT_IVL is -1 (Issue 3158)
This commit is contained in:
@@ -176,10 +176,12 @@ void zmq::ipc_connecter_t::start_connecting ()
|
||||
|
||||
void zmq::ipc_connecter_t::add_reconnect_timer ()
|
||||
{
|
||||
int rc_ivl = get_new_reconnect_ivl ();
|
||||
add_timer (rc_ivl, reconnect_timer_id);
|
||||
socket->event_connect_retried (endpoint, rc_ivl);
|
||||
timer_started = true;
|
||||
if (options.reconnect_ivl != -1) {
|
||||
int rc_ivl = get_new_reconnect_ivl ();
|
||||
add_timer (rc_ivl, reconnect_timer_id);
|
||||
socket->event_connect_retried (endpoint, rc_ivl);
|
||||
timer_started = true;
|
||||
}
|
||||
}
|
||||
|
||||
int zmq::ipc_connecter_t::get_new_reconnect_ivl ()
|
||||
|
||||
Reference in New Issue
Block a user