diff options
author | Remko Tronçon <git@el-tramo.be> | 2009-08-10 18:42:37 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2009-08-10 18:42:37 (GMT) |
commit | 2cf66be04453bb212948e720d08dca4cfa96b35c (patch) | |
tree | 38d6da8fea25a43e0472490829ae32543cfc355f /Swiften | |
parent | 525d9b52319f52346ac2354c30e0bbb487a422f4 (diff) | |
download | swift-2cf66be04453bb212948e720d08dca4cfa96b35c.zip swift-2cf66be04453bb212948e720d08dca4cfa96b35c.tar.bz2 |
Fixed Session restart bug.
Diffstat (limited to 'Swiften')
-rw-r--r-- | Swiften/Session/Session.cpp | 7 | ||||
-rw-r--r-- | Swiften/Session/Session.h | 1 |
2 files changed, 7 insertions, 1 deletions
diff --git a/Swiften/Session/Session.cpp b/Swiften/Session/Session.cpp index 92d1fdc..625b7ad 100644 --- a/Swiften/Session/Session.cpp +++ b/Swiften/Session/Session.cpp @@ -15,7 +15,8 @@ Session::Session( payloadParserFactories(payloadParserFactories), payloadSerializers(payloadSerializers), streamStack(0), - initialized(false) { + initialized(false), + finishing(false) { } Session::~Session() { @@ -28,14 +29,18 @@ void Session::startSession() { } void Session::finishSession() { + finishing = true; connection->disconnect(); handleSessionFinished(boost::optional<SessionError>()); + finishing = false; onSessionFinished(boost::optional<SessionError>()); } void Session::finishSession(const SessionError& error) { + finishing = true; connection->disconnect(); handleSessionFinished(boost::optional<SessionError>(error)); + finishing = false; onSessionFinished(boost::optional<SessionError>(error)); } diff --git a/Swiften/Session/Session.h b/Swiften/Session/Session.h index 2c5ec34..26d10c1 100644 --- a/Swiften/Session/Session.h +++ b/Swiften/Session/Session.h @@ -108,5 +108,6 @@ namespace Swift { boost::shared_ptr<ConnectionLayer> connectionLayer; StreamStack* streamStack; bool initialized; + bool finishing; }; } |