diff options
| author | Ernest Allen <eallen@apache.org> | 2015-06-10 17:11:49 +0000 |
|---|---|---|
| committer | Ernest Allen <eallen@apache.org> | 2015-06-10 17:11:49 +0000 |
| commit | 3bc9a286738ac4e5368f3b04e71bcbcbaa4180a0 (patch) | |
| tree | f37424c91b2a0362cfde1499301cd874a3f356cc /cpp | |
| parent | 395dea053fe691a983a1cf13c234ca236f7ac5eb (diff) | |
| download | qpid-python-3bc9a286738ac4e5368f3b04e71bcbcbaa4180a0.tar.gz | |
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
Diffstat (limited to 'cpp')
| -rw-r--r-- | cpp/src/qpid/broker/SessionManager.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
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<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) { |
