diff options
| -rw-r--r-- | Swiften/Network/Connector.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Swiften/Network/Connector.cpp b/Swiften/Network/Connector.cpp index a58efbc..da2490f 100644 --- a/Swiften/Network/Connector.cpp +++ b/Swiften/Network/Connector.cpp @@ -33,2 +33,6 @@ void Connector::start() { queriedAllServices = false; + if (timeoutMilliseconds > 0) { + timer = timerFactory->createTimer(timeoutMilliseconds); + timer->onTick.connect(boost::bind(&Connector::handleTimeout, shared_from_this())); + } if (serviceLookupPrefix) { @@ -36,6 +40,2 @@ void Connector::start() { serviceQuery->onResult.connect(boost::bind(&Connector::handleServiceQueryResult, shared_from_this(), _1)); - if (timeoutMilliseconds > 0) { - timer = timerFactory->createTimer(timeoutMilliseconds); - timer->onTick.connect(boost::bind(&Connector::handleTimeout, shared_from_this())); - } serviceQuery->run(); |
Swift