summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/cluster/PollerDispatch.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2009-08-06 17:41:18 +0000
committerAlan Conway <aconway@apache.org>2009-08-06 17:41:18 +0000
commit1af1e0114b71a366dc78a47c3d63833f1a0b4c8a (patch)
tree85488c593a8d165641d45035d16a78ae402fbdea /cpp/src/qpid/cluster/PollerDispatch.cpp
parent7ffe1a63bfdbf071ca4e3b1f31e66182caa90873 (diff)
downloadqpid-python-1af1e0114b71a366dc78a47c3d63833f1a0b4c8a.tar.gz
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
Diffstat (limited to 'cpp/src/qpid/cluster/PollerDispatch.cpp')
-rw-r--r--cpp/src/qpid/cluster/PollerDispatch.cpp7
1 files changed, 5 insertions, 2 deletions
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<sys::Poller> 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.