summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/qmf/AgentSession.cpp
diff options
context:
space:
mode:
authorTed Ross <tross@apache.org>2010-10-07 22:21:19 +0000
committerTed Ross <tross@apache.org>2010-10-07 22:21:19 +0000
commit36932c8c005b1295ca802685e040ab727f176688 (patch)
tree7780039fa394f36112cbf9ab7478398571b7e445 /qpid/cpp/src/qmf/AgentSession.cpp
parentbb3bd520ce00588c7539b51e0df8ffbcd1e84c2d (diff)
downloadqpid-python-36932c8c005b1295ca802685e040ab727f176688.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@1005654 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/qmf/AgentSession.cpp')
-rw-r--r--qpid/cpp/src/qmf/AgentSession.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/qpid/cpp/src/qmf/AgentSession.cpp b/qpid/cpp/src/qmf/AgentSession.cpp
index 8c93008a69..47e40ed24a 100644
--- a/qpid/cpp/src/qmf/AgentSession.cpp
+++ b/qpid/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;