summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-12-31 15:00:15 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-12-31 15:00:15 (GMT)
commitcb1cc3c0205295002f2cd760cbd801842b30096e (patch)
treed45c97ba64c75a69b99202b49fc0c230da1987ce /Swiften/Client
parenta0a3f3a587295a5a0ef57af6ae34e8e97db60ef7 (diff)
downloadswift-contrib-cb1cc3c0205295002f2cd760cbd801842b30096e.zip
swift-contrib-cb1cc3c0205295002f2cd760cbd801842b30096e.tar.bz2
Put a timeout of 60s on connecting & resolving.
Resolves: #87.
Diffstat (limited to 'Swiften/Client')
-rw-r--r--Swiften/Client/Client.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Swiften/Client/Client.cpp b/Swiften/Client/Client.cpp
index 27f3d9c..c704248 100644
--- a/Swiften/Client/Client.cpp
+++ b/Swiften/Client/Client.cpp
@@ -36,8 +36,9 @@ bool Client::isAvailable() {
void Client::connect() {
assert(!connector_);
- connector_ = boost::shared_ptr<Connector>(new Connector(jid_.getDomain(), &resolver_, connectionFactory_));
+ connector_ = boost::shared_ptr<Connector>(new Connector(jid_.getDomain(), &resolver_, connectionFactory_, timerFactory_));
connector_->onConnectFinished.connect(boost::bind(&Client::handleConnectorFinished, this, _1));
+ connector_->setTimeoutMilliseconds(60*1000);
connector_->start();
}