|
|
@ -368,7 +368,11 @@ func (ws *WServer) getUserAllCons(uid string) map[int]*UserConn {
|
|
|
|
rwLock.RLock()
|
|
|
|
rwLock.RLock()
|
|
|
|
defer rwLock.RUnlock()
|
|
|
|
defer rwLock.RUnlock()
|
|
|
|
if connMap, ok := ws.wsUserToConn[uid]; ok {
|
|
|
|
if connMap, ok := ws.wsUserToConn[uid]; ok {
|
|
|
|
return connMap
|
|
|
|
newConnMap := make(map[int]*UserConn)
|
|
|
|
|
|
|
|
for k, v := range connMap {
|
|
|
|
|
|
|
|
newConnMap[k] = v
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return newConnMap
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|