diff --git a/internal/websocket/broadcast.go b/internal/websocket/broadcast.go index e2c175d..32a6477 100644 --- a/internal/websocket/broadcast.go +++ b/internal/websocket/broadcast.go @@ -11,7 +11,7 @@ import ( // Sends continous messages to all connected WebSocket clients func SendPermanentBroadCastMessage() { - ticker := time.NewTicker(time.Second) + ticker := time.NewTicker(BROADCAST_INTERVAL * time.Second) defer ticker.Stop() for range ticker.C { diff --git a/internal/websocket/vars.go b/internal/websocket/vars.go index 5aedb53..ad02180 100644 --- a/internal/websocket/vars.go +++ b/internal/websocket/vars.go @@ -7,6 +7,7 @@ import ( "git.smsvc.net/pomodoro/GoTomato/pkg/models" ) +const BROADCAST_INTERVAL = 1 const SEND_TIMEOUT = 10 const STALE_CLIENT_TIMEOUT = 90 const STALE_CHECK_INTERVALL = 30