mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
properly clear inactive cursors.
This commit is contained in:
parent
81867d811b
commit
7d53e59945
@ -344,6 +344,10 @@ func (manager *WebSocketManagerCtx) startInactiveCursors() {
|
|||||||
case <-manager.shutdownInactiveCursors:
|
case <-manager.shutdownInactiveCursors:
|
||||||
manager.logger.Info().Msg("stopping inactive cursors handler")
|
manager.logger.Info().Msg("stopping inactive cursors handler")
|
||||||
manager.shutdownInactiveCursors = nil
|
manager.shutdownInactiveCursors = nil
|
||||||
|
|
||||||
|
// remove last cursor entries and send empty message
|
||||||
|
_ = manager.sessions.PopCursors()
|
||||||
|
manager.sessions.InactiveCursorsBroadcast(event.SESSION_CURSORS, []message.SessionCursors{}, nil)
|
||||||
return
|
return
|
||||||
case <-ticker.C:
|
case <-ticker.C:
|
||||||
cursorsMap := manager.sessions.PopCursors()
|
cursorsMap := manager.sessions.PopCursors()
|
||||||
|
Loading…
Reference in New Issue
Block a user