From 46d70555659c05a0c8d95c6d7aa8c7e0cc5ebc66 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Tue, 24 Aug 2010 10:20:55 +0200 Subject: connecter object unregisters its fd correctly --- src/zmq_connecter.cpp | 12 ++++-------- 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 (); -- cgit v1.2.3