diff --git a/internal/api/room/control.go b/internal/api/room/control.go index 0ff8a6cb..659b87ba 100644 --- a/internal/api/room/control.go +++ b/internal/api/room/control.go @@ -60,6 +60,7 @@ func (h *RoomHandler) controlRelease(w http.ResponseWriter, r *http.Request) { return } + h.desktop.ResetKeys() h.sessions.ClearHost() h.sessions.Broadcast( @@ -117,8 +118,9 @@ func (h *RoomHandler) controlReset(w http.ResponseWriter, r *http.Request) { return } + h.desktop.ResetKeys() h.sessions.ClearHost() - + h.sessions.Broadcast( message.ControlHost{ Event: event.CONTROL_HOST, diff --git a/internal/websocket/handler/control.go b/internal/websocket/handler/control.go index 9ad26394..af436fec 100644 --- a/internal/websocket/handler/control.go +++ b/internal/websocket/handler/control.go @@ -12,7 +12,9 @@ func (h *MessageHandlerCtx) controlRelease(session types.Session) error { return nil } + h.desktop.ResetKeys() h.sessions.ClearHost() + h.sessions.Broadcast( message.ControlHost{ Event: event.CONTROL_HOST, diff --git a/internal/websocket/handler/session.go b/internal/websocket/handler/session.go index 5a42aa11..49b64384 100644 --- a/internal/websocket/handler/session.go +++ b/internal/websocket/handler/session.go @@ -32,6 +32,7 @@ func (h *MessageHandlerCtx) SessionConnected(session types.Session) error { func (h *MessageHandlerCtx) SessionDisconnected(session types.Session) error { // clear host if exists if session.IsHost() { + h.desktop.ResetKeys() h.sessions.ClearHost() h.sessions.Broadcast(