mirror of
https://github.com/d4rken-org/capod.git
synced 2026-09-14 18:26:11 -04:00
seenFirstAt on a connected device is meant to be the connect time, and the connected-devices flow maintains that by pruning its cache to the currently connected addresses on every emission. bondedDevices() wrote into the same cache for every bonded device, connected or not, and never pruned. AapAutoConnect queries bonded devices on every connected-devices emission, the disconnect one included, so an entry pruned at disconnect was re-stamped milliseconds later at disconnect time. The next reconnect then inherited the previous disconnect as its connect time, and the popup reaction rejects a connection older than 30 seconds — so any reconnect more than half a minute after the previous disconnect silently lost its popup. bondedDevices() is now a cache reader: a connected bonded device still reports its true connect time, a non-connected one gets the current time, which no caller reads. The connected-devices path becomes the cache's only writer, which is the invariant its prune-and-stamp logic already assumed.