mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-12 13:05:58 +08:00
kickoff
This commit is contained in:
@@ -292,11 +292,13 @@ func (r *RPCServer) KickUserOffline(_ context.Context, req *pbRelay.KickUserOffl
|
||||
oldConnMap := ws.getUserAllCons(v)
|
||||
if conn, ok := oldConnMap[int(req.PlatformID)]; ok { // user->map[platform->conn]
|
||||
ws.sendKickMsg(conn, &UserConn{})
|
||||
conn.Close()
|
||||
}
|
||||
SetTokenKicked(v, int(req.PlatformID), req.OperationID)
|
||||
}
|
||||
return &pbRelay.KickUserOfflineResp{}, nil
|
||||
|
||||
}
|
||||
|
||||
func sendMsgToUser(conn *UserConn, bMsg []byte, in *pbRelay.OnlinePushMsgReq, RecvPlatForm int, RecvID string) (ResultCode int64) {
|
||||
err := ws.writeMsg(conn, websocket.BinaryMessage, bMsg)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user