diff options
author | Martin Sustrik <sustrik@250bpm.com> | 2010-08-24 10:20:55 +0200 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2010-08-25 15:39:21 +0200 |
commit | 46d70555659c05a0c8d95c6d7aa8c7e0cc5ebc66 (patch) | |
tree | 48d6136b731803fbb1cc71abc103f72e6fb8a997 | |
parent | 87655b0b9d9121465e0b2ea1976b0879b1b1f756 (diff) |
connecter object unregisters its fd correctly
-rw-r--r-- | src/zmq_connecter.cpp | 12 | ||||
-rw-r--r-- | src/zmq_connecter.hpp | 1 |
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 (); |