fix: introduce const for broadcast interval
- change ticker to use BROADCAST_INTERVAL constant
- define BROADCAST_INTERVAL as 1 second
🤖
This commit is contained in:
parent
a09de61a33
commit
9a86adaf85
2 changed files with 2 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue