feat: remove inactive players after 60s disconnect timeout

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-24 10:59:33 +09:00
parent 46afd82060
commit ce2f03baf5
3 changed files with 57 additions and 0 deletions

View File

@@ -285,6 +285,9 @@ func (m Model) pollState() tea.Cmd {
type tickMsg struct{}
func (m Model) updateGame(msg tea.Msg) (tea.Model, tea.Cmd) {
if m.session != nil && m.fingerprint != "" {
m.session.TouchActivity(m.fingerprint)
}
// Refresh state on every update
if m.session != nil {
m.gameState = m.session.GetState()