diff --git a/internal/pomodoro/pomodoro.go b/internal/pomodoro/pomodoro.go index d5e88de..e75f679 100644 --- a/internal/pomodoro/pomodoro.go +++ b/internal/pomodoro/pomodoro.go @@ -23,8 +23,8 @@ var pomodoroResumeChannel = make(chan bool, 1) var mu sync.Mutex // to synchronize access to shared state -// RunPomodoroTimer iterates the Pomodoro work/break sessions. -func RunPomodoroTimer(clients map[*websocket.Conn]*models.Client) { +// RunPomodoro iterates the Pomodoro work/break sessions. +func RunPomodoro(clients map[*websocket.Conn]*models.Client) { mu.Lock() pomodoroOngoing = true pomodoroPaused = false diff --git a/internal/websocket/client_commands.go b/internal/websocket/client_commands.go index b88ca78..2938a6b 100644 --- a/internal/websocket/client_commands.go +++ b/internal/websocket/client_commands.go @@ -30,7 +30,7 @@ func handleClientCommands(ws *websocket.Conn) { switch command.Command { case "start": if !pomodoro.IsPomodoroOngoing() { - go pomodoro.RunPomodoroTimer(Clients) // Start the timer with the list of clients + go pomodoro.RunPomodoro(Clients) // Start the timer with the list of clients } case "stop": if pomodoro.IsPomodoroOngoing() {