diff options
Diffstat (limited to 'internal/game/owner.go')
| -rw-r--r-- | internal/game/owner.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/internal/game/owner.go b/internal/game/owner.go index 8546d10..ce1f687 100644 --- a/internal/game/owner.go +++ b/internal/game/owner.go @@ -136,10 +136,11 @@ func (g *Game) run(fn func()) { close(task) }) { // The owner loop has stopped (graceful shutdown in progress). - // Admissions are already closed, so only stragglers reach this: - // execute inline rather than block forever. A full queue never - // takes this path: enqueue applies backpressure instead. - fn() + // Admissions are closed: DROP the task. Executing it on the + // caller's goroutine would mutate live state concurrently with the + // shutdown sequence and after the final-save barrier (network + // transports are still draining until transportStop runs). See + // TestShutdownRejectsSessionInput. return } <-task |
