Compare commits

..

No commits in common. "0c89ff3224bbebdd0c262e42df0a163c0559edc9" and "2d5fa692d3cf36e3510a6084dc36dc4ae44481be" have entirely different histories.

2 changed files with 1 additions and 3 deletions

View file

@ -29,7 +29,7 @@ func SendPermanentBroadCastMessage() {
client.Conn.SetWriteDeadline(time.Now().Add(SEND_TIMEOUT * time.Second)) client.Conn.SetWriteDeadline(time.Now().Add(SEND_TIMEOUT * time.Second))
err := client.Conn.WriteMessage(websocket.TextMessage, jsonMessage) err := client.Conn.WriteMessage(websocket.TextMessage, jsonMessage)
if err != nil { if err != nil {
helper.Logger.Error("Error broadcasting to client:", "msg", err, "host", client.RealIP, "clients", len(Clients)) helper.Logger.Info("Error broadcasting to client:", "msg", err, "host", client.RealIP, "clients", len(Clients))
} }
} }
mu.Unlock() mu.Unlock()

View file

@ -3,7 +3,6 @@ package websocket
import ( import (
"time" "time"
"git.smsvc.net/pomodoro/GoTomato/internal/helper"
"git.smsvc.net/pomodoro/GoTomato/pkg/models" "git.smsvc.net/pomodoro/GoTomato/pkg/models"
"github.com/gorilla/websocket" "github.com/gorilla/websocket"
) )
@ -34,7 +33,6 @@ func RemoveStaleClients() {
if !sendPing(client) || isStale(client) { if !sendPing(client) || isStale(client) {
client.Conn.Close() client.Conn.Close()
delete(Clients, client.Conn.LocalAddr()) delete(Clients, client.Conn.LocalAddr())
helper.Logger.Info("Removed stale client", "host", client.RealIP, "clients", len(Clients))
} }
} }
mu.Unlock() mu.Unlock()