From 8a682a8b833b8c5d5508255e83f536c6f59fa60a Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Tue, 3 Jul 2018 08:21:56 -0400 Subject: [PATCH] fix previous commit --- llarp/iwp_link.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/llarp/iwp_link.cpp b/llarp/iwp_link.cpp index b728e1240..368079871 100644 --- a/llarp/iwp_link.cpp +++ b/llarp/iwp_link.cpp @@ -516,7 +516,8 @@ namespace iwp { // TODO: is this right? auto &front = q.front(); - nextMsgID = std::max(nextMsgID, front->msgid); + // the items are already sorted anyways so this doesn't really do much + nextMsgID = std::max(nextMsgID, front->msgid); if(!router->HandleRecvLinkMessage(parent, front->Buffer())) { llarp::Warn("failed to process inbound message ", front->msgid); @@ -1796,7 +1797,7 @@ namespace iwp } ++nextMsgID; } - else if(recvqueue.Size() > 2) + else { recvqueue.Put(new InboundMessage(id, msg)); success = process_inbound_queue();