mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
fix: platform client conn delete
This commit is contained in:
parent
f75fabd664
commit
8d892da5a7
@ -40,12 +40,12 @@ func (u *UserMap) Get(key string, platformID int) ([]*Client, bool, bool) {
|
|||||||
func (u *UserMap) Set(key string, v *Client) {
|
func (u *UserMap) Set(key string, v *Client) {
|
||||||
allClients, existed := u.m.Load(key)
|
allClients, existed := u.m.Load(key)
|
||||||
if existed {
|
if existed {
|
||||||
log.ZDebug(context.Background(), "Set existed", "user_id", key, "client", v)
|
log.ZDebug(context.Background(), "Set existed", "user_id", key, "client", *v)
|
||||||
oldClients := allClients.([]*Client)
|
oldClients := allClients.([]*Client)
|
||||||
oldClients = append(oldClients, v)
|
oldClients = append(oldClients, v)
|
||||||
u.m.Store(key, oldClients)
|
u.m.Store(key, oldClients)
|
||||||
} else {
|
} else {
|
||||||
log.ZDebug(context.Background(), "Set not existed", "user_id", key, "client", v)
|
log.ZDebug(context.Background(), "Set not existed", "user_id", key, "client", *v)
|
||||||
var clients []*Client
|
var clients []*Client
|
||||||
clients = append(clients, v)
|
clients = append(clients, v)
|
||||||
u.m.Store(key, clients)
|
u.m.Store(key, clients)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user