mirror of
				https://github.com/openimsdk/open-im-server.git
				synced 2025-11-04 19:32:17 +08:00 
			
		
		
		
	online cache
This commit is contained in:
		
							parent
							
								
									6e2659c64a
								
							
						
					
					
						commit
						f87ee44459
					
				@ -100,7 +100,7 @@ func (ws *WsServer) ChangeOnlineStatus(concurrent int) {
 | 
				
			|||||||
		case now := <-scanTicker.C:
 | 
							case now := <-scanTicker.C:
 | 
				
			||||||
			pushUserState(ws.clients.GetAllUserStatus(now.Add(-cachekey.OnlineExpire/3), now)...)
 | 
								pushUserState(ws.clients.GetAllUserStatus(now.Add(-cachekey.OnlineExpire/3), now)...)
 | 
				
			||||||
		case state := <-ws.clients.UserState():
 | 
							case state := <-ws.clients.UserState():
 | 
				
			||||||
			log.ZDebug(context.Background(), "user online change", "userID", state.UserID, "online", state.Online, "offline", state.Offline)
 | 
								log.ZDebug(context.Background(), "OnlineCache user online change", "userID", state.UserID, "online", state.Online, "offline", state.Offline)
 | 
				
			||||||
			pushUserState(state)
 | 
								pushUserState(state)
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user