fix(channel): a pairing can be reset from either side, and the link survives a closed tab, a relay restart and a fifth viewer #60
Loading…
Reference in a new issue
No description provided.
Delete branch "pairing-reset"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes from the review of the control channel, with the pairing reset asked for.
Pairing could not be reset. When the watch had forgotten a viewer (forgotten in its menu while the tab was closed, a reinstall, a pairing never confirmed), the viewer waited forever with every button hidden. Now:
The link could wedge (found by the review, confirmed by tests):
after/Last-Event-IDrAlso: envelopes are checked and compacted at the relay, the body is read before the lock, 1,000 channels and 32 MB queued at most (and
mem_limit: 128m), JSON bodies on every answer for the watch, any 4xx settles a watch request, the outbox is capped, the queue places survive an app restart, a malformed envelope can't crash the watch, and a tone where the device can't vibrate.The privacy page says what the tombstone keeps (the random ID and two token hashes, 7 days, in memory).
Tests: relay
go test -race(new tests for the ring, stale places, the poll's size and five channels, envelopes, tombstones); viewer 81 of 81, with tests for the stuck pairing and a pairing ended by the watch. The watch code is checked by CI's compile; its behavior needs the device tests: pair, forget from the menu with the tab closed, then open the tab (it should say the watch ended the pairing), and pair a fifth viewer.dawid referenced this pull request2026-11-19 13:05:46 +00:00