summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Client/Session.cpp')
-rw-r--r--Swiften/Client/Session.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/Swiften/Client/Session.cpp b/Swiften/Client/Session.cpp
index c4adfa0..1ae97d6 100644
--- a/Swiften/Client/Session.cpp
+++ b/Swiften/Client/Session.cpp
@@ -52,10 +52,10 @@ Session::~Session() {
void Session::start() {
assert(state_ == Initial);
state_ = Connecting;
- connection_ = connectionFactory_->createConnection(jid_.getDomain());
+ connection_ = connectionFactory_->createConnection();
connection_->onConnected.connect(boost::bind(&Session::handleConnected, this));
connection_->onError.connect(boost::bind(&Session::handleConnectionError, this, _1));
- connection_->connect();
+ connection_->connect(jid_.getDomain());
}
void Session::stop() {
@@ -93,6 +93,9 @@ void Session::handleConnectionError(Connection::Error error) {
case Connection::ReadError:
setError(ConnectionReadError);
break;
+ case Connection::WriteError:
+ setError(ConnectionWriteError);
+ break;
case Connection::ConnectionError:
setError(ConnectionError);
break;