mirror of
https://github.com/m1k1o/neko.git
synced 2025-05-22 05:27:05 +02:00
inactive cursor length rewrite.
This commit is contained in:
parent
78e4c38264
commit
1025eedc22
1 changed files with 4 additions and 7 deletions
|
@ -147,15 +147,12 @@ func (manager *WebSocketManagerCtx) Start() {
|
|||
return
|
||||
case <-ticker.C:
|
||||
cursorsMap := manager.sessions.PopCursors()
|
||||
if len(cursorsMap) == 0 {
|
||||
if lastEmpty {
|
||||
continue
|
||||
}
|
||||
|
||||
lastEmpty = true
|
||||
} else {
|
||||
lastEmpty = false
|
||||
length := len(cursorsMap)
|
||||
if length == 0 && lastEmpty {
|
||||
continue
|
||||
}
|
||||
lastEmpty = length == 0
|
||||
|
||||
cursors := []message.SessionCursor{}
|
||||
for session, cursor := range cursorsMap {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue