Commit d1e920d9 authored by hujiebin's avatar hujiebin

有err||uid不在线才入库

parent f3f88e2e
......@@ -427,11 +427,14 @@ func SendSocketMicChange(seqId string, userId uint64, micUserExternalId, txGroup
time.Sleep(time.Millisecond * 200)
}
//记录socket,注意闭包问题
go func(userId uint64, msg *userProxy.GroupMicChange, rspUids []uint64, err error) {
buf, _ := json.Marshal(msg)
AddRpcLog(MsgTypeGroupMicChange, userId, string(buf[:]), rspUids, err)
}(userId, msg, rspUids, err)
// 记录socket
// 有err||uid不在线才入库
if err != nil || len(rspUids) > 0 {
go func(userId uint64, msg *userProxy.GroupMicChange, rspUids []uint64, err error) {
buf, _ := json.Marshal(msg)
AddRpcLog(MsgTypeGroupMicChange, userId, string(buf[:]), rspUids, err)
}(userId, msg, rspUids, err)
}
if err != nil {
mylogrus.MyLog.Errorf("grpc SendSocketMicChange send fail,seqId:%v,retry:%v,data:%v,err:%v", seqId, n, *msg, err)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment