From e6445b2523f2c94671273c5030b31ce866db2dbf Mon Sep 17 00:00:00 2001 From: Tom Fifield Date: Sat, 8 Nov 2025 14:08:44 +1100 Subject: [PATCH] Revert "Only send Neighbours if we have some to send. (#7493)" This reverts commit b0e8321514d91da0f5a90c324e3d9dce0b36af5b. --- src/modules/NeighborInfoModule.cpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/modules/NeighborInfoModule.cpp b/src/modules/NeighborInfoModule.cpp index 97dc17001..eebf428a4 100644 --- a/src/modules/NeighborInfoModule.cpp +++ b/src/modules/NeighborInfoModule.cpp @@ -105,15 +105,14 @@ void NeighborInfoModule::sendNeighborInfo(NodeNum dest, bool wantReplies) { meshtastic_NeighborInfo neighborInfo = meshtastic_NeighborInfo_init_zero; collectNeighborInfo(&neighborInfo); - // only send neighbours if we have some to send - if (neighborInfo.neighbors_count > 0) { - meshtastic_MeshPacket *p = allocDataProtobuf(neighborInfo); - p->to = dest; - p->decoded.want_response = wantReplies; - p->priority = meshtastic_MeshPacket_Priority_BACKGROUND; - printNeighborInfo("SENDING", &neighborInfo); - service->sendToMesh(p, RX_SRC_LOCAL, true); - } + meshtastic_MeshPacket *p = allocDataProtobuf(neighborInfo); + // send regardless of whether or not we have neighbors in our DB, + // because we want to get neighbors for the next cycle + p->to = dest; + p->decoded.want_response = wantReplies; + p->priority = meshtastic_MeshPacket_Priority_BACKGROUND; + printNeighborInfo("SENDING", &neighborInfo); + service->sendToMesh(p, RX_SRC_LOCAL, true); } /* @@ -215,4 +214,4 @@ meshtastic_Neighbor *NeighborInfoModule::getOrCreateNeighbor(NodeNum originalSen neighbors.push_back(new_nbr); } return &neighbors.back(); -} +} \ No newline at end of file