summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/qpid/cluster
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2010-08-05 17:07:35 +0000
committerAlan Conway <aconway@apache.org>2010-08-05 17:07:35 +0000
commit472c966a8bc5408cd52eb596315017e2aec5843d (patch)
treedccb1f2633266757396e88435fcc4039737b48ae /qpid/cpp/src/qpid/cluster
parent3f12c0a87eaab09e9084b17d21b7f4e793945908 (diff)
downloadqpid-python-472c966a8bc5408cd52eb596315017e2aec5843d.tar.gz
Fix crash on exit with --cluster-cman.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@982698 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/qpid/cluster')
-rw-r--r--qpid/cpp/src/qpid/cluster/Quorum_cman.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/qpid/cpp/src/qpid/cluster/Quorum_cman.cpp b/qpid/cpp/src/qpid/cluster/Quorum_cman.cpp
index 507d9649b9..f7d2c5c409 100644
--- a/qpid/cpp/src/qpid/cluster/Quorum_cman.cpp
+++ b/qpid/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),