diff options
| author | Alan Conway <aconway@apache.org> | 2010-10-25 18:00:34 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2010-10-25 18:00:34 +0000 |
| commit | f27a733f9a4cca3ad2a42acb35ab4620a47e320d (patch) | |
| tree | a4d7d7a34a6cf42e1241e998f7da012ee37b109f /cpp/src/qpid/cluster/PollerDispatch.cpp | |
| parent | 2c422462dc717e667c13aa74bbc552c8507e3f83 (diff) | |
| download | qpid-python-f27a733f9a4cca3ad2a42acb35ab4620a47e320d.tar.gz | |
New cluster: core framework and initial implementation of enqueue logic.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1027210 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster/PollerDispatch.cpp')
| -rw-r--r-- | cpp/src/qpid/cluster/PollerDispatch.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/cpp/src/qpid/cluster/PollerDispatch.cpp b/cpp/src/qpid/cluster/PollerDispatch.cpp index b8d94b95a5..43c171efe8 100644 --- a/cpp/src/qpid/cluster/PollerDispatch.cpp +++ b/cpp/src/qpid/cluster/PollerDispatch.cpp @@ -37,9 +37,11 @@ PollerDispatch::PollerDispatch(Cpg& c, boost::shared_ptr<sys::Poller> p, started(false) {} -PollerDispatch::~PollerDispatch() { - if (started) - dispatchHandle.stopWatch(); +PollerDispatch::~PollerDispatch() { stop(); } + +void PollerDispatch::stop() { + if (started) dispatchHandle.stopWatch(); + started = false; } void PollerDispatch::start() { @@ -54,6 +56,7 @@ void PollerDispatch::dispatch(sys::DispatchHandle& h) { h.rewatch(); } catch (const std::exception& e) { QPID_LOG(critical, "Error in cluster dispatch: " << e.what()); + stop(); onError(); } } |
