mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-10 16:06:09 +00:00
Problem: reconnect_timer_id duplicated and essentially used only in base class
Solution: removed definitions and uses in subclasses
This commit is contained in:
parent
bed3b0cfb4
commit
a766a4b67e
@ -50,12 +50,6 @@ class ipc_connecter_t : public stream_connecter_base_t
|
|||||||
bool delayed_start_);
|
bool delayed_start_);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// ID of the timer used to delay the reconnection.
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
reconnect_timer_id = 1
|
|
||||||
};
|
|
||||||
|
|
||||||
// Handlers for I/O events.
|
// Handlers for I/O events.
|
||||||
void out_event ();
|
void out_event ();
|
||||||
|
|
||||||
|
@ -54,6 +54,12 @@ class stream_connecter_base_t : public own_t, public io_object_t
|
|||||||
~stream_connecter_base_t ();
|
~stream_connecter_base_t ();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
// ID of the timer used to delay the reconnection.
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
reconnect_timer_id = 1
|
||||||
|
};
|
||||||
|
|
||||||
// Internal function to return a reconnect backoff delay.
|
// Internal function to return a reconnect backoff delay.
|
||||||
// Will modify the current_reconnect_ivl used for next call
|
// Will modify the current_reconnect_ivl used for next call
|
||||||
// Returns the currently used interval
|
// Returns the currently used interval
|
||||||
@ -63,12 +69,6 @@ class stream_connecter_base_t : public own_t, public io_object_t
|
|||||||
|
|
||||||
// TODO check if some members can be made private
|
// TODO check if some members can be made private
|
||||||
protected:
|
protected:
|
||||||
// ID of the timer used to delay the reconnection.
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
reconnect_timer_id = 1
|
|
||||||
};
|
|
||||||
|
|
||||||
// Handlers for incoming commands.
|
// Handlers for incoming commands.
|
||||||
void process_plug ();
|
void process_plug ();
|
||||||
void process_term (int linger_);
|
void process_term (int linger_);
|
||||||
|
@ -116,7 +116,6 @@ void zmq::tcp_connecter_t::out_event ()
|
|||||||
|
|
||||||
void zmq::tcp_connecter_t::timer_event (int id_)
|
void zmq::tcp_connecter_t::timer_event (int id_)
|
||||||
{
|
{
|
||||||
zmq_assert (id_ == reconnect_timer_id || id_ == connect_timer_id);
|
|
||||||
if (id_ == connect_timer_id) {
|
if (id_ == connect_timer_id) {
|
||||||
_connect_timer_started = false;
|
_connect_timer_started = false;
|
||||||
rm_handle ();
|
rm_handle ();
|
||||||
|
@ -51,12 +51,6 @@ class tipc_connecter_t : public stream_connecter_base_t
|
|||||||
bool delayed_start_);
|
bool delayed_start_);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// ID of the timer used to delay the reconnection.
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
reconnect_timer_id = 1
|
|
||||||
};
|
|
||||||
|
|
||||||
// Handlers for I/O events.
|
// Handlers for I/O events.
|
||||||
void out_event ();
|
void out_event ();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user