diff options
Diffstat (limited to 'Swiften/Network/Connector.cpp')
-rw-r--r-- | Swiften/Network/Connector.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Swiften/Network/Connector.cpp b/Swiften/Network/Connector.cpp index 5510acb..2775c97 100644 --- a/Swiften/Network/Connector.cpp +++ b/Swiften/Network/Connector.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2015 Isode Limited. + * Copyright (c) 2010-2016 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ @@ -50,6 +50,10 @@ void Connector::start() { } void Connector::stop() { + if (currentConnection) { + currentConnection->onConnectFinished.disconnect(boost::bind(&Connector::handleConnectionConnectFinished, shared_from_this(), _1)); + currentConnection->disconnect(); + } finish(boost::shared_ptr<Connection>()); } |