Panning the mobile map more than twice a second leaves the stream locked to the old viewport #55
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Problem
update_boundsis capped at 120 frames per minute and keyed on the peer IP, not the socket. The documented SwiftUI client pushes a region change on every pan, so a normal drag exhausts the budget; the denial reply is never read by the sample client, and the server keeps filtering on the rectangle it held when the budget ran out. The map shows the new area while packets keep arriving for the old one. Clients behind one CGNAT egress share the budget, and the docs say the limit is per socket and do not listupdate_boundsat all.Evidence
At
2f150f66:lib/aprsme_web/channels/mobile_channel.ex:78sets@update_bounds_limit 120.lib/aprsme_web/channels/mobile_channel.ex:138returns the deny reply from thewithand never reachesapply_bounds_update, so the stored bounds stay stale.lib/aprsme_web/channels/mobile_channel.ex:436keys the bucketmobile_channel:#{op}:#{ip}.lib/aprsme_web/channels/mobile_channel.ex:454repliesRate limit exceeded; retry laterwithretry_after_ms.docs/mobile-api.md:227says expensive operations are limited to 30 per socket per minute and does not mentionupdate_bounds;:464shows the sample client pushing bounds with no reply handler and no debounce.Expected
The budget is documented and keyed per socket as the docs claim, the documented client debounces, and a denied pan does not leave the server filtering on a stale rectangle without telling the client to resubscribe.
How to verify
Extend the existing sustained panning test at
test/aprsme_web/channels/mobile_channel_test.exs:320to assert the socket's bounds are unchanged after the 121st push and that a packet inside the new bounds is not delivered.Acceptance criteria
update_boundswith its budget.Effort: S
Lens: api