From 2faa95c162f1118be5767451b8f23c4323472e2d Mon Sep 17 00:00:00 2001 From: Sebastian Mark Date: Wed, 20 Nov 2024 22:01:56 +0100 Subject: [PATCH] remove client from list if stale --- internal/websocket/staleClients.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/websocket/staleClients.go b/internal/websocket/staleClients.go index 9bb354b..456ef11 100644 --- a/internal/websocket/staleClients.go +++ b/internal/websocket/staleClients.go @@ -14,6 +14,7 @@ func RemoveStaleClients() { for _, client := range Clients { if client.IsStale() { client.Conn.Close() + delete(Clients, client.Conn.LocalAddr()) } } mu.Unlock()