fix: initialize pomodoroConfig from DefaultPomodoroConfig only once
🤖
This commit is contained in:
parent
bf2685a055
commit
8deb642a7e
1 changed files with 2 additions and 1 deletions
|
@ -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 {
|
||||||
|
|
Loading…
Reference in a new issue