feat: remove unused client mutex
- remove unused Mutex from `models.Client` struct
- remove lock from `HandleConnection()`
- replace websocket.Conn with models.Client in `handleClientCommands()`
🤖
This commit is contained in:
parent
94b6786c7c
commit
bdfd5c3b84
3 changed files with 8 additions and 12 deletions
|
@ -3,7 +3,6 @@ package websocket
|
|||
import (
|
||||
"encoding/json"
|
||||
"github.com/charmbracelet/log"
|
||||
"github.com/gorilla/websocket"
|
||||
|
||||
"git.smsvc.net/pomodoro/GoTomato/internal/pomodoro"
|
||||
"git.smsvc.net/pomodoro/GoTomato/internal/shared"
|
||||
|
@ -11,7 +10,8 @@ import (
|
|||
)
|
||||
|
||||
// Listens for commands from a client and handles them
|
||||
func handleClientCommands(ws *websocket.Conn) {
|
||||
func handleClientCommands(c models.Client) {
|
||||
ws := c.Conn
|
||||
for {
|
||||
var clientCommand models.ClientCommand
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue