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"