mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
ResetKeys on ClearHost.
This commit is contained in:
parent
964588b328
commit
b7103ca809
@ -60,6 +60,7 @@ func (h *RoomHandler) controlRelease(w http.ResponseWriter, r *http.Request) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
h.desktop.ResetKeys()
|
||||||
h.sessions.ClearHost()
|
h.sessions.ClearHost()
|
||||||
|
|
||||||
h.sessions.Broadcast(
|
h.sessions.Broadcast(
|
||||||
@ -117,6 +118,7 @@ func (h *RoomHandler) controlReset(w http.ResponseWriter, r *http.Request) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
h.desktop.ResetKeys()
|
||||||
h.sessions.ClearHost()
|
h.sessions.ClearHost()
|
||||||
|
|
||||||
h.sessions.Broadcast(
|
h.sessions.Broadcast(
|
||||||
|
@ -12,7 +12,9 @@ func (h *MessageHandlerCtx) controlRelease(session types.Session) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
h.desktop.ResetKeys()
|
||||||
h.sessions.ClearHost()
|
h.sessions.ClearHost()
|
||||||
|
|
||||||
h.sessions.Broadcast(
|
h.sessions.Broadcast(
|
||||||
message.ControlHost{
|
message.ControlHost{
|
||||||
Event: event.CONTROL_HOST,
|
Event: event.CONTROL_HOST,
|
||||||
|
@ -32,6 +32,7 @@ func (h *MessageHandlerCtx) SessionConnected(session types.Session) error {
|
|||||||
func (h *MessageHandlerCtx) SessionDisconnected(session types.Session) error {
|
func (h *MessageHandlerCtx) SessionDisconnected(session types.Session) error {
|
||||||
// clear host if exists
|
// clear host if exists
|
||||||
if session.IsHost() {
|
if session.IsHost() {
|
||||||
|
h.desktop.ResetKeys()
|
||||||
h.sessions.ClearHost()
|
h.sessions.ClearHost()
|
||||||
|
|
||||||
h.sessions.Broadcast(
|
h.sessions.Broadcast(
|
||||||
|
Loading…
Reference in New Issue
Block a user