diff options
Diffstat (limited to 'cpp/src/qpid/cluster/PollerDispatch.cpp')
| -rw-r--r-- | cpp/src/qpid/cluster/PollerDispatch.cpp | 7 |
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. |
