mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
ws remove log
This commit is contained in:
parent
1d09ffa529
commit
b5de638c0b
@ -199,34 +199,33 @@ func (ws *WServer) sendSignalMsgReq(conn *UserConn, m *Req) {
|
|||||||
log.NewInfo(m.OperationID, "Ws call success to sendSignalMsgReq start", m.MsgIncr, m.ReqIdentifier, m.SendID, m.Data)
|
log.NewInfo(m.OperationID, "Ws call success to sendSignalMsgReq start", m.MsgIncr, m.ReqIdentifier, m.SendID, m.Data)
|
||||||
nReply := new(pbChat.SendMsgResp)
|
nReply := new(pbChat.SendMsgResp)
|
||||||
isPass, errCode, errMsg, pData := ws.argsValidate(m, constant.WSSendSignalMsg)
|
isPass, errCode, errMsg, pData := ws.argsValidate(m, constant.WSSendSignalMsg)
|
||||||
isPass2, errCode2, errMsg2, signalResp, msgData := ws.signalMessageAssemble(pData.(*sdk_ws.SignalReq), m.OperationID)
|
if isPass {
|
||||||
if isPass && isPass2 {
|
isPass2, errCode2, errMsg2, signalResp, msgData := ws.signalMessageAssemble(pData.(*sdk_ws.SignalReq), m.OperationID)
|
||||||
pbData := pbChat.SendMsgReq{
|
if isPass2 {
|
||||||
Token: m.Token,
|
pbData := pbChat.SendMsgReq{
|
||||||
OperationID: m.OperationID,
|
Token: m.Token,
|
||||||
MsgData: msgData,
|
OperationID: m.OperationID,
|
||||||
}
|
MsgData: msgData,
|
||||||
log.NewInfo(m.OperationID, "Ws call success to sendSignalMsgReq middle", m.ReqIdentifier, m.SendID, m.MsgIncr, msgData)
|
}
|
||||||
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfflineMessageName)
|
log.NewInfo(m.OperationID, "Ws call success to sendSignalMsgReq middle", m.ReqIdentifier, m.SendID, m.MsgIncr, msgData)
|
||||||
client := pbChat.NewChatClient(etcdConn)
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfflineMessageName)
|
||||||
reply, err := client.SendMsg(context.Background(), &pbData)
|
client := pbChat.NewChatClient(etcdConn)
|
||||||
if err != nil {
|
reply, err := client.SendMsg(context.Background(), &pbData)
|
||||||
log.NewError(pbData.OperationID, "rpc sendMsg err", err.Error())
|
if err != nil {
|
||||||
nReply.ErrCode = 200
|
log.NewError(pbData.OperationID, "rpc sendMsg err", err.Error())
|
||||||
nReply.ErrMsg = err.Error()
|
nReply.ErrCode = 200
|
||||||
ws.sendSignalMsgResp(conn, 200, err.Error(), m, signalResp)
|
nReply.ErrMsg = err.Error()
|
||||||
|
ws.sendSignalMsgResp(conn, 200, err.Error(), m, signalResp)
|
||||||
|
} else {
|
||||||
|
log.NewInfo(pbData.OperationID, "rpc call success to sendMsgReq", reply.String())
|
||||||
|
ws.sendSignalMsgResp(conn, 0, "", m, signalResp)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
log.NewInfo(pbData.OperationID, "rpc call success to sendMsgReq", reply.String())
|
|
||||||
ws.sendSignalMsgResp(conn, 0, "", m, signalResp)
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
if isPass {
|
|
||||||
log.NewError(m.OperationID, isPass2, errCode2, errMsg2)
|
log.NewError(m.OperationID, isPass2, errCode2, errMsg2)
|
||||||
ws.sendSignalMsgResp(conn, errCode2, errMsg2, m, signalResp)
|
ws.sendSignalMsgResp(conn, errCode2, errMsg2, m, signalResp)
|
||||||
} else {
|
|
||||||
ws.sendSignalMsgResp(conn, errCode, errMsg, m, signalResp)
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
ws.sendSignalMsgResp(conn, errCode, errMsg, m, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user