Skip to content

Commit 8bd36fa

Browse files
committed
Route the raced loopback through handleReceived
1 parent 390e6ed commit 8bd36fa

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/mesh/Router.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1276,8 +1276,9 @@ void Router::deliverLocal(meshtastic_MeshPacket *p, RxSource src)
12761276
if (queued)
12771277
return;
12781278
if (!stillNested) {
1279-
// The drain finished first, so nothing would pick this up; deliver it here instead.
1280-
dispatchReceived(copy, src);
1279+
// The drain finished first, so nothing would pick this up. Go through handleReceived()
1280+
// rather than dispatchReceived() so a loopback from its modules still defers.
1281+
handleReceived(copy, src);
12811282
packetPool.release(copy);
12821283
return;
12831284
}

src/mesh/Router.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ class Router : protected concurrency::OSThread, protected PacketHistory
168168
* Note: some packets may merely being passed through this node and will be forwarded elsewhere.
169169
*
170170
* Note: this packet will never be called for messages sent/generated by this node.
171-
* Note: this method will free the provided packet.
171+
* Note: this does NOT free the provided packet; the caller still owns it.
172172
*/
173173
void handleReceived(meshtastic_MeshPacket *p, RxSource src = RX_SRC_RADIO);
174174

0 commit comments

Comments
 (0)