summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2010-08-24 10:20:55 +0200
committerMartin Sustrik <sustrik@250bpm.com>2010-08-25 15:39:21 +0200
commit46d70555659c05a0c8d95c6d7aa8c7e0cc5ebc66 (patch)
tree48d6136b731803fbb1cc71abc103f72e6fb8a997 /src
parent87655b0b9d9121465e0b2ea1976b0879b1b1f756 (diff)
connecter object unregisters its fd correctly
Diffstat (limited to 'src')
-rw-r--r--src/zmq_connecter.cpp12
-rw-r--r--src/zmq_connecter.hpp1
2 files changed, 4 insertions, 9 deletions
diff --git a/src/zmq_connecter.cpp b/src/zmq_connecter.cpp
index 6223c45..8f8fae2 100644
--- a/src/zmq_connecter.cpp
+++ b/src/zmq_connecter.cpp
@@ -41,6 +41,10 @@ zmq::zmq_connecter_t::zmq_connecter_t (class io_thread_t *io_thread_,
zmq::zmq_connecter_t::~zmq_connecter_t ()
{
+ if (wait)
+ cancel_timer ();
+ if (handle_valid)
+ rm_fd (handle);
}
void zmq::zmq_connecter_t::process_plug ()
@@ -51,14 +55,6 @@ void zmq::zmq_connecter_t::process_plug ()
start_connecting ();
}
-void zmq::zmq_connecter_t::process_unplug ()
-{
- if (wait)
- cancel_timer ();
- if (handle_valid)
- rm_fd (handle);
-}
-
void zmq::zmq_connecter_t::in_event ()
{
// We are not polling for incomming data, so we are actually called
diff --git a/src/zmq_connecter.hpp b/src/zmq_connecter.hpp
index 191e5b2..f1a4c30 100644
--- a/src/zmq_connecter.hpp
+++ b/src/zmq_connecter.hpp
@@ -44,7 +44,6 @@ namespace zmq
// Handlers for incoming commands.
void process_plug ();
- void process_unplug ();
// Handlers for I/O events.
void in_event ();