From b4eff894b8e7d49e02da038a0cb3d75f7db9a7bd 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()