From 3bb44f765c64867196c00801f7299d490c41b5f4 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Mon, 26 Oct 2009 19:23:47 +0000 Subject: Ignore exceptions from detach() in ~SessionImpl. Otherwise clients can crash in terminate() if there is an error, e.g. a TransportFailure. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@829912 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/src/qpid/client/SessionImpl.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'qpid/cpp/src') diff --git a/qpid/cpp/src/qpid/client/SessionImpl.cpp b/qpid/cpp/src/qpid/client/SessionImpl.cpp index d443a1170b..b3181bdb3c 100644 --- a/qpid/cpp/src/qpid/client/SessionImpl.cpp +++ b/qpid/cpp/src/qpid/client/SessionImpl.cpp @@ -76,9 +76,11 @@ SessionImpl::~SessionImpl() { Lock l(state); if (state != DETACHED && state != DETACHING) { 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(); + try { + // 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. setState(DETACHED); handleClosed(); state.waitWaiters(); -- cgit v1.2.1