summaryrefslogtreecommitdiff
path: root/qpid/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'qpid/cpp/src')
-rw-r--r--qpid/cpp/src/qpid/broker/SessionManager.cpp6
-rw-r--r--qpid/cpp/src/qpid/broker/SessionManager.h1
-rw-r--r--qpid/cpp/src/qpid/broker/SessionState.cpp2
3 files changed, 8 insertions, 1 deletions
diff --git a/qpid/cpp/src/qpid/broker/SessionManager.cpp b/qpid/cpp/src/qpid/broker/SessionManager.cpp
index e422e50657..303687c788 100644
--- a/qpid/cpp/src/qpid/broker/SessionManager.cpp
+++ b/qpid/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/qpid/cpp/src/qpid/broker/SessionManager.h b/qpid/cpp/src/qpid/broker/SessionManager.h
index bbe969de6c..58a7b3f01f 100644
--- a/qpid/cpp/src/qpid/broker/SessionManager.h
+++ b/qpid/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/qpid/cpp/src/qpid/broker/SessionState.cpp b/qpid/cpp/src/qpid/broker/SessionState.cpp
index b56aa106a3..17537e11be 100644
--- a/qpid/cpp/src/qpid/broker/SessionState.cpp
+++ b/qpid/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() {