diff options
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/qpid/broker/SessionManager.cpp | 6 | ||||
-rw-r--r-- | cpp/src/qpid/broker/SessionManager.h | 1 | ||||
-rw-r--r-- | cpp/src/qpid/broker/SessionState.cpp | 2 |
3 files changed, 8 insertions, 1 deletions
diff --git a/cpp/src/qpid/broker/SessionManager.cpp b/cpp/src/qpid/broker/SessionManager.cpp index e422e50657..303687c788 100644 --- a/cpp/src/qpid/broker/SessionManager.cpp +++ b/cpp/src/qpid/broker/SessionManager.cpp @@ -82,6 +82,12 @@ std::auto_ptr<SessionState> SessionManager::resume( return state; } +void SessionManager::erase(const framing::Uuid& id) +{ + Mutex::ScopedLock l(lock); + active.erase(id); +} + void SessionManager::eraseExpired() { // Called with lock held. if (!suspended.empty()) { diff --git a/cpp/src/qpid/broker/SessionManager.h b/cpp/src/qpid/broker/SessionManager.h index bbe969de6c..58a7b3f01f 100644 --- a/cpp/src/qpid/broker/SessionManager.h +++ b/cpp/src/qpid/broker/SessionManager.h @@ -67,6 +67,7 @@ class SessionManager : private boost::noncopyable { Suspended suspended; Active active; + void erase(const framing::Uuid&); void eraseExpired(); friend class SessionState; // removes deleted sessions from active set. }; diff --git a/cpp/src/qpid/broker/SessionState.cpp b/cpp/src/qpid/broker/SessionState.cpp index b56aa106a3..17537e11be 100644 --- a/cpp/src/qpid/broker/SessionState.cpp +++ b/cpp/src/qpid/broker/SessionState.cpp @@ -49,7 +49,7 @@ SessionState::SessionState(SessionManager& f, SessionHandler& h, uint32_t timeou SessionState::~SessionState() { // Remove ID from active session list. - factory.active.erase(getId()); + factory.erase(getId()); } SessionHandler& SessionState::getHandler() { |