Commit a5c85c6c authored by hujiebin's avatar hujiebin

feat:默认是3秒超时,现在155加大一些

parent d597b804
......@@ -136,8 +136,12 @@ func init() {
}
}
func multicast(uids []uint64, msgType uint32, data []byte) ([]uint64, error) {
ctx, cancel := context.WithTimeout(context.Background(), time.Second*3)
func multicast(uids []uint64, msgType uint32, data []byte, seconds ...time.Duration) ([]uint64, error) {
duration := time.Duration(3)
if len(seconds) > 0 {
duration = seconds[0]
}
ctx, cancel := context.WithTimeout(context.Background(), time.Second*duration)
defer cancel()
rsp, err := userClient.Multicast(ctx, &userCenter.MulticastMessage{
Uids: uids,
......
......@@ -419,7 +419,7 @@ func SendSocketMicChange(seqId string, userId uint64, micUserExternalId, txGroup
n := 0
for {
n++
rspUids, err = multicast(userIds, MsgTypeGroupMicChange, buffer)
rspUids, err = multicast(userIds, MsgTypeGroupMicChange, buffer, time.Duration(10))
if n >= 3 || len(rspUids) <= 0 {
break
}
......
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