Commit d1e920d9 authored by hujiebin's avatar hujiebin

有err||uid不在线才入库

parent f3f88e2e
...@@ -427,11 +427,14 @@ func SendSocketMicChange(seqId string, userId uint64, micUserExternalId, txGroup ...@@ -427,11 +427,14 @@ func SendSocketMicChange(seqId string, userId uint64, micUserExternalId, txGroup
time.Sleep(time.Millisecond * 200) time.Sleep(time.Millisecond * 200)
} }
//记录socket,注意闭包问题 // 记录socket
go func(userId uint64, msg *userProxy.GroupMicChange, rspUids []uint64, err error) { // 有err||uid不在线才入库
buf, _ := json.Marshal(msg) if err != nil || len(rspUids) > 0 {
AddRpcLog(MsgTypeGroupMicChange, userId, string(buf[:]), rspUids, err) go func(userId uint64, msg *userProxy.GroupMicChange, rspUids []uint64, err error) {
}(userId, msg, rspUids, err) buf, _ := json.Marshal(msg)
AddRpcLog(MsgTypeGroupMicChange, userId, string(buf[:]), rspUids, err)
}(userId, msg, rspUids, err)
}
if err != nil { if err != nil {
mylogrus.MyLog.Errorf("grpc SendSocketMicChange send fail,seqId:%v,retry:%v,data:%v,err:%v", seqId, n, *msg, err) 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