don't leak messages if they are handled locally

This commit is contained in:
geeksville 2020-05-02 19:53:13 -07:00
parent 07b4eea037
commit ad2f639195

View File

@ -266,8 +266,10 @@ void MeshService::sendToMesh(MeshPacket *p)
}
// If the phone sent a packet just to us, don't send it out into the network
if (p->to == nodeDB.getNodeNum())
if (p->to == nodeDB.getNodeNum()) {
DEBUG_MSG("Dropping locally processed message\n");
releaseToPool(p);
}
else {
// Note: We might return !OK if our fifo was full, at that point the only option we have is to drop it
if (router.send(p) != ERRNO_OK) {