From b62e92b5a402384f64205576003dd3891a86d169 Mon Sep 17 00:00:00 2001 From: Sebastian Mark Date: Sun, 20 Oct 2024 11:26:23 +0200 Subject: [PATCH] fix: resolve race condition in pause/resume check - replace direct check of pomodoroPaused with IsPomodoroPaused function --- internal/pomodoro/timer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/pomodoro/timer.go b/internal/pomodoro/timer.go index b71f770..69627c3 100644 --- a/internal/pomodoro/timer.go +++ b/internal/pomodoro/timer.go @@ -23,7 +23,7 @@ func startTimer(clients map[*websocket.Conn]*models.Client, remainingSeconds int mu.Unlock() default: // Broadcast the current state to all clients - if !pomodoroPaused { + if !IsPomodoroPaused() { broadcast.BroadcastMessage(clients, models.BroadcastMessage{ Mode: mode, Session: session,