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
This issue is rather annoying for me, and I was exploring this fix, and looked at #689 but it seems rather involved to complete. Would effort be better spent moving that along, or would it make sense to do a smaller/temporary workaround for this until #689 is complete?
I was hoping this was going to be just a simple fix, but as I explored, it seems like it would require a bit of refactoring, but it's not clear to me yet where the best solution would be.
I first tried to send a LeaveGameRequest from the cleanup() function of menu/src/multiplayer/joined/state.rs but it panicked because GameNameRes has already been cleaned up and is gone. If this is the best place for the logic, then we would need to change the ordering so the game name is available, or add an additional state/event before cleanup for leaving a game.
I also considered putting it in multiplayer/src/game.rs or lifecycle.rs, but the connector does not know the name of the game, so the game_name would have become part of the connector data, or get passed in through one of the events/states.
It could also go in menu/src/multiplayer/joining.rs but that does not have access to the lifecycle/data needed to make the LeaveGameRequest. It focuses on the joining flow, and the leaving flow is quite different, so it's not clear if leaving makes sense as an extension of the joining flow, or if it is a separate flow and should be kept separate from joining.
If it makes sense to do a temporary fix, which of the above (or another I missed) would be the best place to fix this issue? Or should I start working on #689 and get that longer-term fix going instead?
Currently, the player stays connected to the game indefinitely if they press "X" button and disconnect.
Similar to #319 except this is about explicit & immediate leaving.
The text was updated successfully, but these errors were encountered: