diff options
Diffstat (limited to 'qpid/cpp/src')
| -rw-r--r-- | qpid/cpp/src/qpid/broker/SessionManager.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/qpid/cpp/src/qpid/broker/SessionManager.cpp b/qpid/cpp/src/qpid/broker/SessionManager.cpp index a2955f3bb0..a39cbab88a 100644 --- a/qpid/cpp/src/qpid/broker/SessionManager.cpp +++ b/qpid/cpp/src/qpid/broker/SessionManager.cpp @@ -47,11 +47,11 @@ SessionManager::~SessionManager() { detached.clear(); // Must clear before destructor as session dtor will call forget() } -std::auto_ptr<SessionState> SessionManager::attach(SessionHandler& h, const SessionId& id, bool/*force*/) { +std::auto_ptr<SessionState> SessionManager::attach(SessionHandler& h, const SessionId& id, bool force) { Mutex::ScopedLock l(lock); eraseExpired(); // Clean up expired table std::pair<Attached::iterator, bool> insert = attached.insert(id); - if (!insert.second) + if (!insert.second && !force) throw SessionBusyException(QPID_MSG("Session already attached: " << id)); Detached::iterator i = std::find(detached.begin(), detached.end(), id); std::auto_ptr<SessionState> state; @@ -62,7 +62,6 @@ std::auto_ptr<SessionState> SessionManager::attach(SessionHandler& h, const Ses state->attach(h); } return state; - // FIXME aconway 2008-04-29: implement force } void SessionManager::detach(std::auto_ptr<SessionState> session) { |
