From 28f3e87fc6c8c5c7046234bf9a08ae62f26d7f3a Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Thu, 17 Feb 2011 10:33:38 +0100 Subject: Add delay before reconnecting So far ZMQ_RECONNECT_IVL delay was used only when TCP connect failed. Now it is used even if connect succeeds and the peer closes the connection afterwards. Signed-off-by: Martin Sustrik --- src/zmq_connecter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/zmq_connecter.cpp') diff --git a/src/zmq_connecter.cpp b/src/zmq_connecter.cpp index d2638ac..57a6c3b 100644 --- a/src/zmq_connecter.cpp +++ b/src/zmq_connecter.cpp @@ -35,11 +35,11 @@ zmq::zmq_connecter_t::zmq_connecter_t (class io_thread_t *io_thread_, class session_t *session_, const options_t &options_, - const char *protocol_, const char *address_) : + const char *protocol_, const char *address_, bool wait_) : own_t (io_thread_, options_), io_object_t (io_thread_), handle_valid (false), - wait (wait_before_connect), + wait (wait_), session (session_), current_reconnect_ivl(options.reconnect_ivl) { -- cgit v1.2.3