summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/cluster/Multicaster.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2009-01-08 17:33:08 +0000
committerAlan Conway <aconway@apache.org>2009-01-08 17:33:08 +0000
commit64bd79537e385a045b3c74de95ddd19f91163a26 (patch)
tree1f4ee85cfac2adca779be9042a5f8c71e67b08f9 /cpp/src/qpid/cluster/Multicaster.cpp
parente6ab393e6dfef3bf90b2552a94e8e00dd3b6bfa4 (diff)
downloadqpid-python-64bd79537e385a045b3c74de95ddd19f91163a26.tar.gz
cluster: handle multicast errors.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@732768 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster/Multicaster.cpp')
-rw-r--r--cpp/src/qpid/cluster/Multicaster.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/cpp/src/qpid/cluster/Multicaster.cpp b/cpp/src/qpid/cluster/Multicaster.cpp
index 37d2f81b39..a106ec128b 100644
--- a/cpp/src/qpid/cluster/Multicaster.cpp
+++ b/cpp/src/qpid/cluster/Multicaster.cpp
@@ -28,8 +28,9 @@
namespace qpid {
namespace cluster {
-Multicaster::Multicaster(Cpg& cpg_, const boost::shared_ptr<sys::Poller>& poller) :
- cpg(cpg_), queue(boost::bind(&Multicaster::sendMcast, this, _1), poller),
+Multicaster::Multicaster(Cpg& cpg_, const boost::shared_ptr<sys::Poller>& poller, boost::function<void()> onError_) :
+ onError(onError_), cpg(cpg_),
+ queue(boost::bind(&Multicaster::sendMcast, this, _1), poller),
holding(true)
{
queue.start();
@@ -70,7 +71,9 @@ void Multicaster::sendMcast(PollableEventQueue::Queue& values) {
values.erase(values.begin(), i);
}
catch (const std::exception& e) {
- throw ClusterLeaveException(e.what());
+ QPID_LOG(critical, "Multicast error: " << e.what());
+ queue.stop();
+ onError();
}
}