fix: resolve race condition in pause/resume check
- replace direct check of pomodoroPaused with IsPomodoroPaused function
This commit is contained in:
parent
4471c86a0c
commit
b62e92b5a4
1 changed files with 1 additions and 1 deletions
|
@ -23,7 +23,7 @@ func startTimer(clients map[*websocket.Conn]*models.Client, remainingSeconds int
|
||||||
mu.Unlock()
|
mu.Unlock()
|
||||||
default:
|
default:
|
||||||
// Broadcast the current state to all clients
|
// Broadcast the current state to all clients
|
||||||
if !pomodoroPaused {
|
if !IsPomodoroPaused() {
|
||||||
broadcast.BroadcastMessage(clients, models.BroadcastMessage{
|
broadcast.BroadcastMessage(clients, models.BroadcastMessage{
|
||||||
Mode: mode,
|
Mode: mode,
|
||||||
Session: session,
|
Session: session,
|
||||||
|
|
Loading…
Reference in a new issue