Shorter timeout still needed for pubkey unkown and ad-hoc send

This commit is contained in:
Ben Meadors
2026-01-19 18:11:28 -06:00
parent 733eb3a961
commit 67f9f74509

View File

@@ -133,10 +133,15 @@ meshtastic_MeshPacket *NodeInfoModule::allocReply()
// Use graduated scaling based on active mesh size (10 minute base, scales with congestion coefficient)
uint32_t timeoutMs = Default::getConfiguredOrDefaultMsScaled(0, 10 * 60, nodeStatus->getNumOnline()) * 1000;
if (lastSentToMesh && Throttle::isWithinTimespanMs(lastSentToMesh, timeoutMs)) {
if (!shorterTimeout && lastSentToMesh && Throttle::isWithinTimespanMs(lastSentToMesh, timeoutMs)) {
LOG_DEBUG("Skip send NodeInfo since we sent it <%us ago", timeoutMs / 1000);
ignoreRequest = true; // Mark it as ignored for MeshModule
return NULL;
} else if (shorterTimeout && lastSentToMesh && Throttle::isWithinTimespanMs(lastSentToMesh, 60 * 1000)) {
// For interactive/urgent requests (e.g., user-triggered or implicit requests), use a shorter 60s timeout
LOG_DEBUG("Skip send NodeInfo since we sent it <60s ago");
ignoreRequest = true;
return NULL;
} else {
ignoreRequest = false; // Don't ignore requests anymore
meshtastic_User &u = owner;