mirror of
https://github.com/agessaman/meshcore-bot.git
synced 2026-08-14 14:40:00 +00:00
Follow-up to 7cffe1d; all three confirmed against meshcore 2.3.8. Charge the node-wide cooldown for the transmission, not the result. last_neighbors_publish is stamped only by a cycle that completes, so a discover request whose acknowledgement was lost spent the airtime and left the clock at zero -- another sender could immediately start a second round. The service now stamps last_neighbors_attempt before the request, and the command rations on whichever stamp is later. A cycle that bails out before touching the radio still records nothing, so retries stay possible. Restore the contact path when req_regions_sync returns None. send_anon_req gives up early when change_contact_path reports an error -- which is also what a lost acknowledgement for an applied path change looks like -- and that return skips the library's own reset_path. req_regions_sync collapses it to None, previously treated as a plain no-response. On the common "neighbour did not answer" path the extra reset is a redundant device command: no airtime, idempotent, and it re-syncs the contact cache. Stop reporting a rejected restore as a success. reset_path returns an ERROR event for a device rejection or its own response timeout rather than raising, so the helper logged "restored flood path" either way and hid a contact left pinned to zero-hop. It now inspects the event and warns with the reason.