summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/cluster/Multicaster.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/qpid/cluster/Multicaster.cpp')
-rw-r--r--cpp/src/qpid/cluster/Multicaster.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/cpp/src/qpid/cluster/Multicaster.cpp b/cpp/src/qpid/cluster/Multicaster.cpp
index f72867de4d..fee13c92c8 100644
--- a/cpp/src/qpid/cluster/Multicaster.cpp
+++ b/cpp/src/qpid/cluster/Multicaster.cpp
@@ -71,9 +71,9 @@ void Multicaster::mcast(const Event& e) {
}
-void Multicaster::sendMcast(PollableEventQueue::Queue& values) {
+Multicaster::PollableEventQueue::Batch::const_iterator Multicaster::sendMcast(const PollableEventQueue::Batch& values) {
try {
- PollableEventQueue::Queue::iterator i = values.begin();
+ PollableEventQueue::Batch::const_iterator i = values.begin();
while( i != values.end()) {
iovec iov = i->toIovec();
if (!cpg.mcast(&iov, 1)) {
@@ -82,12 +82,13 @@ void Multicaster::sendMcast(PollableEventQueue::Queue& values) {
}
++i;
}
- values.erase(values.begin(), i); // Erase sent events.
+ return i;
}
catch (const std::exception& e) {
QPID_LOG(critical, "Multicast error: " << e.what());
queue.stop();
onError();
+ return values.end();
}
}