aa
This commit is contained in:
@@ -173,10 +173,9 @@ func ImMessage(userID string, ws *websocket.Conn) (err error) {
|
||||
}
|
||||
|
||||
func GetOnlineUserCount() (count int) {
|
||||
s := new(sync.RWMutex)
|
||||
s.Lock()
|
||||
wsClient.s.RLock()
|
||||
count = len(wsClient.ClientsHeart)
|
||||
s.Unlock()
|
||||
wsClient.s.RUnlock()
|
||||
return count
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user