fix(game): prevent green-felt freeze — loading spinner + retry resync
Three changes: 1. GameTable shows a spinner instead of an empty table when mode=online and seatPlayers is empty (waiting for first state broadcast). 2. enterServerMatch schedules a 3s interval that calls service.resync() until seatPlayers is populated, guaranteeing the state always lands. 3. resync() added to OnlineService interface + both implementations so the game store can call it without casting. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -338,6 +338,10 @@ export class SignalrService implements OnlineService {
|
||||
await this.conn?.invoke("PlayNow");
|
||||
}
|
||||
|
||||
resync(): void {
|
||||
void this.conn?.invoke("Resync").catch(() => {});
|
||||
}
|
||||
|
||||
onMatchmaking(cb: (s: MatchmakingState) => void): Unsubscribe {
|
||||
this.mmCbs.add(cb);
|
||||
return () => this.mmCbs.delete(cb);
|
||||
|
||||
Reference in New Issue
Block a user