diff --git a/internal/api/auth/auth.go b/internal/api/auth/auth.go index 733d9206b..60bf1d8a5 100644 --- a/internal/api/auth/auth.go +++ b/internal/api/auth/auth.go @@ -150,7 +150,7 @@ func ParseToken(c *gin.Context) { if err := c.BindJSON(¶ms); err != nil { errMsg := " BindJSON failed " + err.Error() log.NewError("0", errMsg) - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": errMsg}) + c.JSON(http.StatusBadRequest, gin.H{"errCode": 200, "errMsg": errMsg}) return } @@ -161,7 +161,7 @@ func ParseToken(c *gin.Context) { if !ok { errMsg := params.OperationID + " " + "GetUserIDFromTokenExpireTime failed " + errInfo + " token:" + c.Request.Header.Get("token") log.NewError(params.OperationID, errMsg) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": errMsg}) + c.JSON(http.StatusInternalServerError, gin.H{"errCode": 200, "errMsg": errMsg}) return } diff --git a/internal/msg_gateway/gate/logic.go b/internal/msg_gateway/gate/logic.go index 0d18e0653..b9d132cd1 100644 --- a/internal/msg_gateway/gate/logic.go +++ b/internal/msg_gateway/gate/logic.go @@ -54,7 +54,7 @@ func (ws *WServer) msgParse(conn *UserConn, binaryMsg []byte) { ws.pullMsgBySeqListReq(conn, &m) case constant.WsLogoutMsg: log.NewInfo(m.OperationID, "conn.Close()", m.SendID, m.MsgIncr, m.ReqIdentifier) - conn.Close() + // conn.Close() default: log.Error(m.OperationID, "ReqIdentifier failed ", m.SendID, m.MsgIncr, m.ReqIdentifier) } diff --git a/internal/msg_gateway/gate/ws_server.go b/internal/msg_gateway/gate/ws_server.go index ff68124a4..53942155f 100644 --- a/internal/msg_gateway/gate/ws_server.go +++ b/internal/msg_gateway/gate/ws_server.go @@ -268,7 +268,7 @@ func (ws *WServer) addUserConn(uid string, platformID int, conn *UserConn, token if callbackResp.ErrCode != 0 { log.NewError(operationID, utils.GetSelfFuncName(), "callbackUserOnline resp:", callbackResp) } - go ws.MultiTerminalLoginRemoteChecker(uid, int32(platformID), token, operationID) + //go ws.MultiTerminalLoginRemoteChecker(uid, int32(platformID), token, operationID) ws.MultiTerminalLoginChecker(uid, platformID, conn, token, operationID) if oldConnMap, ok := ws.wsUserToConn[uid]; ok { oldConnMap[platformID] = conn