ResetKeys on ClearHost.

This commit is contained in:
Miroslav Šedivý 2020-12-02 10:46:00 +01:00
parent 964588b328
commit b7103ca809
3 changed files with 6 additions and 1 deletions

View File

@ -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,

View File

@ -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,

View File

@ -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(