From def9cf2a6a6991bf19ceb74877152cdc6c149db7 Mon Sep 17 00:00:00 2001 From: Moritz Warning Date: Tue, 23 Jun 2015 00:08:59 +0200 Subject: [PATCH] replace vector::erase, was missed in a previous commit (ref #186) --- node/Multicaster.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/node/Multicaster.cpp b/node/Multicaster.cpp index 29e89189b..8a15bac13 100644 --- a/node/Multicaster.cpp +++ b/node/Multicaster.cpp @@ -330,7 +330,9 @@ void Multicaster::_add(uint64_t now,uint64_t nwid,const MulticastGroup &mg,Multi for(std::vector::iterator tx(gs.txQueue.begin());tx!=gs.txQueue.end();) { if (tx->atLimit()) { - gs.txQueue.erase(tx++); + // erase element (replace by last) + *tx = gs.txQueue.back(); + gs.txQueue.pop_back(); } else { tx->sendIfNew(RR,member); if (tx->atLimit()) {