diff --git a/server/internal/websocket/socket.go b/server/internal/websocket/socket.go index 2439cd2..90dbbe7 100644 --- a/server/internal/websocket/socket.go +++ b/server/internal/websocket/socket.go @@ -10,7 +10,7 @@ import ( type WebSocket struct { id string - ws WebSocketHandler + ws *WebSocketHandler connection *websocket.Conn mu sync.Mutex } diff --git a/server/internal/websocket/websocket.go b/server/internal/websocket/websocket.go index 57cf34e..ba12a65 100644 --- a/server/internal/websocket/websocket.go +++ b/server/internal/websocket/websocket.go @@ -142,6 +142,7 @@ func (ws *WebSocketHandler) Upgrade(w http.ResponseWriter, r *http.Request) erro socket := &WebSocket{ id: id, + ws: ws, connection: connection, }