diff options
Diffstat (limited to 'Swiften/Network/ChainedConnector.cpp')
| -rw-r--r-- | Swiften/Network/ChainedConnector.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Swiften/Network/ChainedConnector.cpp b/Swiften/Network/ChainedConnector.cpp index 94899ad..a9210ba 100644 --- a/Swiften/Network/ChainedConnector.cpp +++ b/Swiften/Network/ChainedConnector.cpp | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2011-2018 Isode Limited. | 2 | * Copyright (c) 2011-2019 Isode Limited. |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * See the COPYING file for more information. | 4 | * See the COPYING file for more information. |
| 5 | */ | 5 | */ |
| @@ -45,7 +45,7 @@ void ChainedConnector::setTimeoutMilliseconds(int milliseconds) { | |||
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | void ChainedConnector::start() { | 47 | void ChainedConnector::start() { |
| 48 | SWIFT_LOG(debug) << "Starting queued connector for " << hostname << std::endl; | 48 | SWIFT_LOG(debug) << "Starting queued connector for " << hostname; |
| 49 | 49 | ||
| 50 | connectionFactoryQueue = std::deque<ConnectionFactory*>(connectionFactories.begin(), connectionFactories.end()); | 50 | connectionFactoryQueue = std::deque<ConnectionFactory*>(connectionFactories.begin(), connectionFactories.end()); |
| 51 | tryNextConnectionFactory(); | 51 | tryNextConnectionFactory(); |
| @@ -63,12 +63,12 @@ void ChainedConnector::stop() { | |||
| 63 | void ChainedConnector::tryNextConnectionFactory() { | 63 | void ChainedConnector::tryNextConnectionFactory() { |
| 64 | assert(!currentConnector); | 64 | assert(!currentConnector); |
| 65 | if (connectionFactoryQueue.empty()) { | 65 | if (connectionFactoryQueue.empty()) { |
| 66 | SWIFT_LOG(debug) << "No more connection factories" << std::endl; | 66 | SWIFT_LOG(debug) << "No more connection factories"; |
| 67 | finish(std::shared_ptr<Connection>(), lastError); | 67 | finish(std::shared_ptr<Connection>(), lastError); |
| 68 | } | 68 | } |
| 69 | else { | 69 | else { |
| 70 | ConnectionFactory* connectionFactory = connectionFactoryQueue.front(); | 70 | ConnectionFactory* connectionFactory = connectionFactoryQueue.front(); |
| 71 | SWIFT_LOG(debug) << "Trying next connection factory: " << typeid(*connectionFactory).name() << std::endl; | 71 | SWIFT_LOG(debug) << "Trying next connection factory: " << typeid(*connectionFactory).name(); |
| 72 | connectionFactoryQueue.pop_front(); | 72 | connectionFactoryQueue.pop_front(); |
| 73 | currentConnector = Connector::create(hostname, port, serviceLookupPrefix, resolver, connectionFactory, timerFactory); | 73 | currentConnector = Connector::create(hostname, port, serviceLookupPrefix, resolver, connectionFactory, timerFactory); |
| 74 | currentConnector->setTimeoutMilliseconds(timeoutMilliseconds); | 74 | currentConnector->setTimeoutMilliseconds(timeoutMilliseconds); |
| @@ -78,7 +78,7 @@ void ChainedConnector::tryNextConnectionFactory() { | |||
| 78 | } | 78 | } |
| 79 | 79 | ||
| 80 | void ChainedConnector::handleConnectorFinished(std::shared_ptr<Connection> connection, std::shared_ptr<Error> error) { | 80 | void ChainedConnector::handleConnectorFinished(std::shared_ptr<Connection> connection, std::shared_ptr<Error> error) { |
| 81 | SWIFT_LOG(debug) << "Connector finished" << std::endl; | 81 | SWIFT_LOG(debug) << "Connector finished"; |
| 82 | currentConnector->onConnectFinished.disconnect(boost::bind(&ChainedConnector::handleConnectorFinished, this, _1, _2)); | 82 | currentConnector->onConnectFinished.disconnect(boost::bind(&ChainedConnector::handleConnectorFinished, this, _1, _2)); |
| 83 | lastError = error; | 83 | lastError = error; |
| 84 | currentConnector.reset(); | 84 | currentConnector.reset(); |
Swift