diff options
author | Alan Conway <aconway@apache.org> | 2010-03-25 13:21:37 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2010-03-25 13:21:37 +0000 |
commit | 44b1e15a0d200024eb48515d01dc541eb483cd34 (patch) | |
tree | ad9564e0c972c24f091704844e84a86320d092ab /cpp/src | |
parent | 075885d1e2c88712d5a7c1f6eaded4b8f56230da (diff) | |
download | qpid-python-44b1e15a0d200024eb48515d01dc541eb483cd34.tar.gz |
Fix "Session was not closed cleanly" warnings in a cluster broker giving an update.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@927384 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/qpid/client/SessionImpl.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cpp/src/qpid/client/SessionImpl.cpp b/cpp/src/qpid/client/SessionImpl.cpp index 34589d59fc..05d90b4314 100644 --- a/cpp/src/qpid/client/SessionImpl.cpp +++ b/cpp/src/qpid/client/SessionImpl.cpp @@ -73,12 +73,12 @@ SessionImpl::~SessionImpl() { { Lock l(state); if (state != DETACHED && state != DETACHING) { - QPID_LOG(warning, "Session was not closed cleanly: " << id); - try { + if (autoDetach) { + QPID_LOG(warning, "Session was not closed cleanly: " << id); // Inform broker but don't wait for detached as that deadlocks. // The detached will be ignored as the channel will be invalid. - if (autoDetach) detach(); - } catch (...) {} // ignore errors. + try { detach(); } catch (...) {} // ignore errors. + } setState(DETACHED); handleClosed(); state.waitWaiters(); |