From d975034680a8b9a11a21ddc1c7f6d83a4ec88080 Mon Sep 17 00:00:00 2001 From: Sebastian Mark Date: Wed, 20 Nov 2024 20:31:24 +0100 Subject: [PATCH] remove duplicate logging --- internal/websocket/broadcast.go | 2 -- internal/websocket/handle_connection.go | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/websocket/broadcast.go b/internal/websocket/broadcast.go index c2bd987..7f0e1b2 100644 --- a/internal/websocket/broadcast.go +++ b/internal/websocket/broadcast.go @@ -31,8 +31,6 @@ func SendPermanentBroadCastMessage() { if time.Now().Sub(client.LastPong) > (10 * time.Second) { // Remove unresponsive client client.Conn.Close() - delete(Clients, client.Conn.LocalAddr()) - helper.Logger.Info("Client timed out", "lastPong", client.LastPong, "host", client.RealIP, "clients", len(Clients)) } } <-tick.C diff --git a/internal/websocket/handle_connection.go b/internal/websocket/handle_connection.go index 1329198..2a0f414 100644 --- a/internal/websocket/handle_connection.go +++ b/internal/websocket/handle_connection.go @@ -5,6 +5,7 @@ import ( "net" "net/http" "sync" + "time" "git.smsvc.net/pomodoro/GoTomato/internal/helper" "git.smsvc.net/pomodoro/GoTomato/pkg/models"