diff options
author | Ted Ross <tross@apache.org> | 2010-10-07 22:21:19 +0000 |
---|---|---|
committer | Ted Ross <tross@apache.org> | 2010-10-07 22:21:19 +0000 |
commit | b54fa57683bee495add37e7c89d56ae790282add (patch) | |
tree | 9df1cd932676b295c2d12da8b7dc4d661d21d507 /cpp/src | |
parent | 43205c5df1725aaf97db4fac5714c00a91e00c1a (diff) | |
download | qpid-python-b54fa57683bee495add37e7c89d56ae790282add.tar.gz |
Fix session-shutdown-after-failure so it does not cause a segfault.
Fixed the method-call wrapper for Python in the qpid messaging wrapper to properly
handle and translate C++ exceptions.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1005654 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/qmf/AgentSession.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cpp/src/qmf/AgentSession.cpp b/cpp/src/qmf/AgentSession.cpp index 8c93008a69..47e40ed24a 100644 --- a/cpp/src/qmf/AgentSession.cpp +++ b/cpp/src/qmf/AgentSession.cpp @@ -223,7 +223,6 @@ void AgentSessionImpl::open() { if (opened) throw QmfException("The session is already open"); - opened = true; const string addrArgs(";{create:never,node:{type:topic}}"); @@ -245,6 +244,7 @@ void AgentSessionImpl::open() // Start the receiver thread threadCanceled = false; + opened = true; thread = new qpid::sys::Thread(*this); // Send an initial agent heartbeat message @@ -255,7 +255,7 @@ void AgentSessionImpl::open() void AgentSessionImpl::close() { if (!opened) - throw QmfException("The session is already closed"); + return; // Stop and join the receiver thread threadCanceled = true; |