From 9192d94dea6be5498ab080f3e2df5667af871d7a Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Wed, 16 Sep 2026 14:41:15 -0400 Subject: fix: casino room eviction, session close race fix, open-payout recovery evidence --- internal/admin/api_rooms.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'internal/admin/api_rooms.go') diff --git a/internal/admin/api_rooms.go b/internal/admin/api_rooms.go index 3c96d53..01b7b9a 100644 --- a/internal/admin/api_rooms.go +++ b/internal/admin/api_rooms.go @@ -320,6 +320,11 @@ func (s *AdminServer) handleRoomByID(w http.ResponseWriter, r *http.Request) { s.world.RebuildRoomIndex(s.dataDir) s.world.ClearRoomState(id) + // Drop any cached in-room games (tables/machines) and refund their + // outstanding wagers — same eviction semantics as bulk delete. + if s.evictRoom != nil { + s.evictRoom(id) + } allIDs, _ := listRoomIDs(s.dataDir) var extraFiles []ExtraFile @@ -1178,6 +1183,9 @@ func (s *AdminServer) handleResolveDuplicate(w http.ResponseWriter, r *http.Requ return } s.world.RebuildRoomIndex(s.dataDir) + // No casino eviction: a duplicate-ID file was never in the room index, + // so no cached game is keyed to it (games are keyed by the indexed + // room's ID, which survives here untouched). s.undoStack.Push(ChangeDesc{ Description: fmt.Sprintf("delete duplicate room file %s", body.Path), FilePath: absPath, -- cgit v1.2.3