rename timer_started to reconnect_timer_started

This commit is contained in:
KIU Shueng Chuan 2015-08-04 20:19:01 +08:00
parent 5724b55f7b
commit 4a0bde8130
2 changed files with 7 additions and 7 deletions

View File

@ -67,7 +67,7 @@ zmq::tcp_connecter_t::tcp_connecter_t (class io_thread_t *io_thread_,
s (retired_fd),
handle_valid (false),
delayed_start (delayed_start_),
timer_started (false),
reconnect_timer_started (false),
session (session_),
current_reconnect_ivl (options.reconnect_ivl)
{
@ -79,7 +79,7 @@ zmq::tcp_connecter_t::tcp_connecter_t (class io_thread_t *io_thread_,
zmq::tcp_connecter_t::~tcp_connecter_t ()
{
zmq_assert (!timer_started);
zmq_assert (!reconnect_timer_started);
zmq_assert (!handle_valid);
zmq_assert (s == retired_fd);
}
@ -94,9 +94,9 @@ void zmq::tcp_connecter_t::process_plug ()
void zmq::tcp_connecter_t::process_term (int linger_)
{
if (timer_started) {
if (reconnect_timer_started) {
cancel_timer (reconnect_timer_id);
timer_started = false;
reconnect_timer_started = false;
}
if (handle_valid) {
@ -154,7 +154,7 @@ void zmq::tcp_connecter_t::out_event ()
void zmq::tcp_connecter_t::timer_event (int id_)
{
zmq_assert (id_ == reconnect_timer_id);
timer_started = false;
reconnect_timer_started = false;
start_connecting ();
}
@ -192,7 +192,7 @@ void zmq::tcp_connecter_t::add_reconnect_timer ()
const int interval = get_new_reconnect_ivl ();
add_timer (interval, reconnect_timer_id);
socket->event_connect_retried (endpoint, interval);
timer_started = true;
reconnect_timer_started = true;
}
int zmq::tcp_connecter_t::get_new_reconnect_ivl ()

View File

@ -108,7 +108,7 @@ namespace zmq
const bool delayed_start;
// True iff a timer has been started.
bool timer_started;
bool reconnect_timer_started;
// Reference to the session we belong to.
zmq::session_base_t *session;