diff options
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; }; } |