From b0b6c702daaf0145d67ee3261ec72673419c0069 Mon Sep 17 00:00:00 2001 From: Sebastian Mark Date: Thu, 21 Nov 2024 19:25:42 +0100 Subject: [PATCH] fix stale logic --- internal/websocket/staleClients.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/websocket/staleClients.go b/internal/websocket/staleClients.go index a3afe14..7e70553 100644 --- a/internal/websocket/staleClients.go +++ b/internal/websocket/staleClients.go @@ -16,7 +16,7 @@ func RemoveStaleClients() { for range ticker.C { mu.Lock() for _, client := range Clients { - if !sendPing(client) || isStale(client) { + if sendPing(client) && !isStale(client) { client.Conn.Close() delete(Clients, client.Conn.LocalAddr()) helper.Logger.Info("Removed stale client", "host", client.RealIP)