Make custom lobby leave idempotent for stale lobby IDs
This commit is contained in:
@@ -168,7 +168,12 @@ func leave(on_done: Callable = Callable()) -> void:
|
||||
lobby_left.emit()
|
||||
if on_done.is_valid(): on_done.call(),
|
||||
func(code: String, msg: String) -> void:
|
||||
print("[CustomLobby] ERR leave ", code, " ", msg))
|
||||
print("[CustomLobby] ERR leave ", code, " ", msg)
|
||||
if code == "LOBBY_NOT_FOUND":
|
||||
# Treat as stale local lobby state and recover UX.
|
||||
clear_state()
|
||||
lobby_left.emit()
|
||||
if on_done.is_valid(): on_done.call())
|
||||
|
||||
|
||||
## Mark the caller as ready with their final deck and first-turn preference.
|
||||
|
||||
Reference in New Issue
Block a user