unsubscribe says Not subscribed and keeps delivering packets while a callsign subscription is active #63
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
After
subscribe_callsign, pushing the documentedunsubscribeevent replies{"status":"ok","response":{"message":"Not subscribed"}}and packets keep arriving. Onlyunsubscribe_callsignor a disconnect stops them, and the reply actively tells the client it was not subscribed.Evidence
At
2f150f66:lib/aprsme_web/channels/mobile_channel.ex:157enters the release branch onlyif socket.assigns[:subscribed] && socket.assigns[:bounds], which is false while a callsign is tracked because the callsign path released the viewport.lib/aprsme_web/channels/mobile_channel.ex:172repliesNot subscribedin that case.docs/mobile-api.md:234documents Unsubscribing asStop receiving packetswith no caveat about callsign subscriptions.Expected
unsubscribestops whichever subscription is active, or the docs say it only covers bounds and nameunsubscribe_callsign.How to verify
In
mobile_channel_test.exs, pushsubscribe_callsign, thenunsubscribe, then a matching spatial packet, and assert no packet push arrives. Today it does.Acceptance criteria
unsubscribereleases a callsign subscription or says why it does not.Effort: S
Lens: api