fix: initialize pomodoroConfig from DefaultPomodoroConfig only once

🤖
This commit is contained in:
Sebastian Mark 2024-10-21 15:46:49 +02:00
parent bf2685a055
commit 8deb642a7e

View file

@ -9,11 +9,12 @@ import (
"log" "log"
) )
var pomodoroConfig = shared.DefaultPomodoroConfig
// handleClientCommands listens for commands from WebSocket clients // handleClientCommands listens for commands from WebSocket clients
func handleClientCommands(ws *websocket.Conn) { func handleClientCommands(ws *websocket.Conn) {
for { for {
var clientCommand models.ClientCommand var clientCommand models.ClientCommand
var pomodoroConfig = shared.DefaultPomodoroConfig
_, message, err := ws.ReadMessage() _, message, err := ws.ReadMessage()
if err != nil { if err != nil {