You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem: Network listeners are started but not clearly stopped, which can lead to duplicated callbacks or stale subscriptions (not tested yet, so is not confirmed yet). Basically, when the player goes from one screen to the next, the network listener from the previous game is still active
Target files:
GameNetworkHandler.java
GameScreen.java:439
AndroidFirebase.java
Refactor:
Add stop/dispose methods in the networking layer.
Store references to every ValueEventListener/ChildEventListener in AndroidFirebase and unregister them when screen exits.
Call networkHandler.stop() from both hide and dispose.
Acceptance criteria:
Re-entering a match screen does not duplicate opponent move events.
No listener callbacks arrive after leaving the match.
The text was updated successfully, but these errors were encountered:
#52, #53)
- Track all Firebase listeners via cleanup runnables in AndroidFirebase
- Add removeAllListeners() to FirebaseAPI interface
- Add stop() to GameNetworkHandler, called from GameScreen hide/dispose
- Fix confirmSetup: propagate errors to onError callback instead of
silently calling onSuccess on failure paths
- Update SetupFlowController to pass error callback to confirmSetup
Problem: Network listeners are started but not clearly stopped, which can lead to duplicated callbacks or stale subscriptions (not tested yet, so is not confirmed yet). Basically, when the player goes from one screen to the next, the network listener from the previous game is still active
Target files:
Refactor:
Acceptance criteria:
The text was updated successfully, but these errors were encountered: