From 8deb642a7e03644c9d07b97858ba5066feb6bcd9 Mon Sep 17 00:00:00 2001 From: Sebastian Mark Date: Mon, 21 Oct 2024 15:46:49 +0200 Subject: [PATCH] fix: initialize pomodoroConfig from DefaultPomodoroConfig only once MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 --- internal/websocket/client_commands.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/websocket/client_commands.go b/internal/websocket/client_commands.go index e1ff8b0..45fe7de 100644 --- a/internal/websocket/client_commands.go +++ b/internal/websocket/client_commands.go @@ -9,11 +9,12 @@ import ( "log" ) +var pomodoroConfig = shared.DefaultPomodoroConfig + // handleClientCommands listens for commands from WebSocket clients func handleClientCommands(ws *websocket.Conn) { for { var clientCommand models.ClientCommand - var pomodoroConfig = shared.DefaultPomodoroConfig _, message, err := ws.ReadMessage() if err != nil {