From 3bc9a286738ac4e5368f3b04e71bcbcbaa4180a0 Mon Sep 17 00:00:00 2001 From: Ernest Allen Date: Wed, 10 Jun 2015 17:11:49 +0000 Subject: QPID-6297: Python client should reconnect after network glitch git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1684716 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/broker/SessionManager.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'cpp') diff --git a/cpp/src/qpid/broker/SessionManager.cpp b/cpp/src/qpid/broker/SessionManager.cpp index a2955f3bb0..a39cbab88a 100644 --- a/cpp/src/qpid/broker/SessionManager.cpp +++ b/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 SessionManager::attach(SessionHandler& h, const SessionId& id, bool/*force*/) { +std::auto_ptr SessionManager::attach(SessionHandler& h, const SessionId& id, bool force) { Mutex::ScopedLock l(lock); eraseExpired(); // Clean up expired table std::pair 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 state; @@ -62,7 +62,6 @@ std::auto_ptr SessionManager::attach(SessionHandler& h, const Ses state->attach(h); } return state; - // FIXME aconway 2008-04-29: implement force } void SessionManager::detach(std::auto_ptr session) { -- cgit v1.2.1