From e671ad9dd4c1a47ff412a531771dd8cfad49a721 Mon Sep 17 00:00:00 2001 From: Sebastian Mark Date: Thu, 21 Nov 2024 20:25:12 +0100 Subject: [PATCH] update stale removal logging --- 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 31e56b5..b636c49 100644 --- a/internal/websocket/staleClients.go +++ b/internal/websocket/staleClients.go @@ -20,9 +20,9 @@ func RemoveStaleClients() { client.Conn.WriteMessage(websocket.PingMessage, nil) if isStale(client) { + helper.Logger.Info("Removing stale client", "host", client.RealIP, "lastPong", client.LastPong.Format(time.RFC3339)) client.Conn.Close() delete(Clients, client.Conn.LocalAddr()) - helper.Logger.Info("Removed stale client", "host", client.RealIP, "lastPong", client.LastPong.Format(time.RFC3339)) } } mu.Unlock()