From 1af1e0114b71a366dc78a47c3d63833f1a0b4c8a Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Thu, 6 Aug 2009 17:41:18 +0000 Subject: Fix cman integration to exit immediately on loss of quorum. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@801740 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/cluster/PollerDispatch.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'cpp/src/qpid/cluster/PollerDispatch.cpp') diff --git a/cpp/src/qpid/cluster/PollerDispatch.cpp b/cpp/src/qpid/cluster/PollerDispatch.cpp index 47c1fd0c39..a839ef863b 100644 --- a/cpp/src/qpid/cluster/PollerDispatch.cpp +++ b/cpp/src/qpid/cluster/PollerDispatch.cpp @@ -33,15 +33,18 @@ PollerDispatch::PollerDispatch(Cpg& c, boost::shared_ptr p, boost::bind(&PollerDispatch::dispatch, this, _1), // read 0, // write boost::bind(&PollerDispatch::disconnect, this, _1) // disconnect - ) + ), + started(false) {} PollerDispatch::~PollerDispatch() { - dispatchHandle.stopWatch(); + if (started) + dispatchHandle.stopWatch(); } void PollerDispatch::start() { dispatchHandle.startWatch(poller); + started = true; } // Entry point: called by IO to dispatch CPG events. -- cgit v1.2.1