diff options
author | Alan Conway <aconway@apache.org> | 2010-08-05 17:07:35 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2010-08-05 17:07:35 +0000 |
commit | 8ae71e306b37ee55b0adb5684a0050ffa5b0d513 (patch) | |
tree | 57b1076fd80a33d14956f3d3e6d7112578eb13a1 /cpp | |
parent | 578406f02e803c86a156c20e1e5cca4ea060b9ce (diff) | |
download | qpid-python-8ae71e306b37ee55b0adb5684a0050ffa5b0d513.tar.gz |
Fix crash on exit with --cluster-cman.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@982698 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/src/qpid/cluster/Quorum_cman.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cpp/src/qpid/cluster/Quorum_cman.cpp b/cpp/src/qpid/cluster/Quorum_cman.cpp index 507d9649b9..f7d2c5c409 100644 --- a/cpp/src/qpid/cluster/Quorum_cman.cpp +++ b/cpp/src/qpid/cluster/Quorum_cman.cpp @@ -47,6 +47,7 @@ Quorum::Quorum(boost::function<void()> err) : enable(false), cman(0), cmanFd(0) } Quorum::~Quorum() { + if (dispatchHandle.get()) dispatchHandle->stopWatch(); dispatchHandle.reset(); if (cman) cman_finish(cman); } @@ -68,6 +69,7 @@ void Quorum::start(boost::shared_ptr<sys::Poller> p) { void Quorum::watch(int fd) { cmanFd = fd; + if (dispatchHandle.get()) dispatchHandle->stopWatch(); dispatchHandle.reset( new sys::DispatchHandleRef( sys::PosixIOHandle(cmanFd), |