diff --git a/rpc/user_center_func.go b/rpc/user_center_func.go index 3ae50425d9e4608c5b6a6d1a12e014aca0117bb5..848ec00d079145956015ce7a8f2870b39f8ac0ac 100644 --- a/rpc/user_center_func.go +++ b/rpc/user_center_func.go @@ -415,7 +415,17 @@ func SendSocketMicChange(seqId string, userId uint64, micUserExternalId, txGroup } if buffer, err := proto.Marshal(msg); err == nil { userIds := []uint64{userId} - rspUids, err := multicast(userIds, MsgTypeGroupMicChange, buffer) + var rspUids []uint64 + n := 0 + for { + n++ + rspUids, err = multicast(userIds, MsgTypeGroupMicChange, buffer) + if n >= 3 || len(rspUids) <= 0 { + break + } + mylogrus.MyLog.Infof("grpc SendSocketMicChange send fail,seqId:%v,retry:%v,data:%v", seqId, n, *msg) + time.Sleep(time.Millisecond * 200) + } //记录socket,注意闭包问题 go func(userIds []uint64, msg *userProxy.GroupMicChange, rspUids []uint64, err error) {