From 348e78718d0810c0a736d3340c5ee359911b33c4 Mon Sep 17 00:00:00 2001 From: GUVWAF Date: Sat, 7 May 2022 15:39:14 +0200 Subject: [PATCH] Call cancelSending in stopRetransmission This also removes pending packet from txQueue if it was already in there --- src/mesh/ReliableRouter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesh/ReliableRouter.cpp b/src/mesh/ReliableRouter.cpp index ee513bae0..899004d12 100644 --- a/src/mesh/ReliableRouter.cpp +++ b/src/mesh/ReliableRouter.cpp @@ -151,7 +151,7 @@ bool ReliableRouter::stopRetransmission(GlobalPacketId key) if (old) { auto numErased = pending.erase(key); assert(numErased == 1); - packetPool.release(old->packet); + cancelSending(getFrom(old->packet), old->packet->id); return true; } else return false;