From d7884f89f51d1ae307c8eeba0a7b57a16eed5c95 Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Tue, 14 Jun 2022 15:56:06 +0800 Subject: [PATCH] rtc --- internal/push/logic/push_to_client.go | 2 +- pkg/common/db/newRedisModel.go | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/internal/push/logic/push_to_client.go b/internal/push/logic/push_to_client.go index 78ec80f65..adcd4b3ed 100644 --- a/internal/push/logic/push_to_client.go +++ b/internal/push/logic/push_to_client.go @@ -124,7 +124,7 @@ func MsgToUser(pushMsg *pbPush.PushMsgReq) { break } // save invitation info for offline push - if err := db.DB.HandleSignalInfo(pushMsg.MsgData); err != nil { + if err := db.DB.HandleSignalInfo(pushMsg.OperationID, pushMsg.MsgData); err != nil { log.NewError(pushMsg.OperationID, utils.GetSelfFuncName(), err.Error(), pushMsg.MsgData) continue } diff --git a/pkg/common/db/newRedisModel.go b/pkg/common/db/newRedisModel.go index 61b4c563b..0393f214c 100644 --- a/pkg/common/db/newRedisModel.go +++ b/pkg/common/db/newRedisModel.go @@ -108,7 +108,7 @@ func (d *DataBases) CleanUpOneUserAllMsgFromRedis(userID string, operationID str return nil } -func (d *DataBases) HandleSignalInfo(msg *pbCommon.MsgData) error { +func (d *DataBases) HandleSignalInfo(operationID string, msg *pbCommon.MsgData) error { req := &pbRtc.SignalReq{} if err := proto.Unmarshal(msg.Content, req); err != nil { return err @@ -126,11 +126,13 @@ func (d *DataBases) HandleSignalInfo(msg *pbCommon.MsgData) error { case *pbRtc.SignalReq_HungUp, *pbRtc.SignalReq_Cancel, *pbRtc.SignalReq_Reject, *pbRtc.SignalReq_Accept: return errors.New("signalInfo do not need offlinePush") default: - log2.NewDebug("", utils.GetSelfFuncName(), "req invalid type", string(msg.Content)) + log2.NewDebug(operationID, utils.GetSelfFuncName(), "req invalid type", string(msg.Content)) return nil } if isInviteSignal { + log2.NewInfo(operationID, utils.GetSelfFuncName(), "invite userID list:", inviteeUserIDList) for _, userID := range inviteeUserIDList { + log2.NewInfo(operationID, utils.GetSelfFuncName(), "invite userID:", userID) timeout, err := strconv.Atoi(config.Config.Rtc.SignalTimeout) if err != nil { return err