mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
Merge remote-tracking branch 'origin/tuoyun' into tuoyun
This commit is contained in:
commit
f579c6b56d
@ -183,7 +183,7 @@ func (ws *WServer) addUserConn(uid string, platformID int32, conn *UserConn, tok
|
|||||||
for _, v := range ws.wsUserToConn {
|
for _, v := range ws.wsUserToConn {
|
||||||
count = count + len(v)
|
count = count + len(v)
|
||||||
}
|
}
|
||||||
log.WarnByKv("WS Add operation", "", "wsUser added", ws.wsUserToConn, "uid", uid, "online_user_num", len(ws.wsUserToConn), "online_conn_num", count)
|
log.WarnByKv("WS Add operation", "", "wsUser added", ws.wsUserToConn, "connection_uid", uid, "connection_platform", constant.PlatformIDToName(platformID), "online_user_num", len(ws.wsUserToConn), "online_conn_num", count)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -206,9 +206,9 @@ func (ws *WServer) delUserConn(conn *UserConn) {
|
|||||||
for _, v := range ws.wsUserToConn {
|
for _, v := range ws.wsUserToConn {
|
||||||
count = count + len(v)
|
count = count + len(v)
|
||||||
}
|
}
|
||||||
log.WarnByKv("WS delete operation", "", "wsUser deleted", ws.wsUserToConn, "uid", uid, "online_user_num", len(ws.wsUserToConn), "online_conn_num", count)
|
log.WarnByKv("WS delete operation", "", "wsUser deleted", ws.wsUserToConn, "disconnection_uid", uid, "disconnection_platform", platform, "online_user_num", len(ws.wsUserToConn), "online_conn_num", count)
|
||||||
} else {
|
} else {
|
||||||
log.WarnByKv("WS delete operation", "", "wsUser deleted", ws.wsUserToConn, "uid", uid, "online_user_num", len(ws.wsUserToConn))
|
log.WarnByKv("WS delete operation", "", "wsUser deleted", ws.wsUserToConn, "disconnection_uid", uid, "disconnection_platform", platform, "online_user_num", len(ws.wsUserToConn))
|
||||||
}
|
}
|
||||||
delete(ws.wsConnToUser, conn)
|
delete(ws.wsConnToUser, conn)
|
||||||
|
|
||||||
@ -272,7 +272,6 @@ func (ws *WServer) headerCheck(w http.ResponseWriter, r *http.Request) bool {
|
|||||||
http.Error(w, http.StatusText(status), status)
|
http.Error(w, http.StatusText(status), status)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
func genMapKey(uid string, platformID int32) string {
|
func genMapKey(uid string, platformID int32) string {
|
||||||
return uid + " " + constant.PlatformIDToName(platformID)
|
return uid + " " + constant.PlatformIDToName(platformID)
|
||||||
|
@ -150,6 +150,7 @@ func (s *userServer) DeleteUsers(_ context.Context, req *pbUser.DeleteUsersReq)
|
|||||||
for _, userID := range req.DeleteUserIDList {
|
for _, userID := range req.DeleteUserIDList {
|
||||||
err := imdb.DeleteUser(userID)
|
err := imdb.DeleteUser(userID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
log.NewError(req.OperationID, "delete user error", userID)
|
||||||
common.ErrCode = 201
|
common.ErrCode = 201
|
||||||
common.ErrMsg = "some uid deleted failed"
|
common.ErrMsg = "some uid deleted failed"
|
||||||
resp.FailedUserIDList = append(resp.FailedUserIDList, userID)
|
resp.FailedUserIDList = append(resp.FailedUserIDList, userID)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user