Turns out that needed to be a list after all. Also clean up Multicaster::gather().
This commit is contained in:
parent
3f7e7e8a88
commit
e7c81ef34e
3 changed files with 9 additions and 7 deletions
|
@ -440,7 +440,7 @@ void Switch::doAnythingWaitingForPeer(const SharedPtr<Peer> &peer)
|
|||
|
||||
{ // finish processing any packets waiting on peer's public key / identity
|
||||
Mutex::Lock _l(_rxQueue_m);
|
||||
for(std::vector< SharedPtr<IncomingPacket> >::iterator rxi(_rxQueue.begin());rxi!=_rxQueue.end();) {
|
||||
for(std::list< SharedPtr<IncomingPacket> >::iterator rxi(_rxQueue.begin());rxi!=_rxQueue.end();) {
|
||||
if ((*rxi)->tryDecode(RR))
|
||||
_rxQueue.erase(rxi++);
|
||||
else ++rxi;
|
||||
|
@ -527,7 +527,7 @@ unsigned long Switch::doTimerTasks()
|
|||
|
||||
{
|
||||
Mutex::Lock _l(_rxQueue_m);
|
||||
for(std::vector< SharedPtr<IncomingPacket> >::iterator i(_rxQueue.begin());i!=_rxQueue.end();) {
|
||||
for(std::list< SharedPtr<IncomingPacket> >::iterator i(_rxQueue.begin());i!=_rxQueue.end();) {
|
||||
if ((now - (*i)->receiveTime()) > ZT_RECEIVE_QUEUE_TIMEOUT) {
|
||||
TRACE("RX %s -> %s timed out",(*i)->source().toString().c_str(),(*i)->destination().toString().c_str());
|
||||
_rxQueue.erase(i++);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue