fix(ble): properly remove cancelled pending detaches
When _process_pending_detaches() finds that an address has reconnected during the grace period, the pending detach entry was not being removed from _pending_detach dict. This caused the entry to be re-evaluated on every cleanup cycle. Now properly deletes the entry when cancelling the detach. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
921dce2dba
commit
2276f493d0
1 changed files with 1 additions and 0 deletions
|
|
@ -785,6 +785,7 @@ class BLEInterface(Interface):
|
|||
|
||||
if has_connected_address:
|
||||
# New connection arrived during grace period - cancel detach
|
||||
del self._pending_detach[identity_hash]
|
||||
RNS.log(f"{self} cancelled detach for {identity_hash[:8]} - address reconnected during grace period", RNS.LOG_DEBUG)
|
||||
else:
|
||||
# No connections - safe to detach
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue