]> 127.0.0.1 Git - bili_danmu/.git/commitdiff
Fix b服不稳定 #93
authorqydysky <qydysky@foxmail.com>
Fri, 15 Dec 2023 21:20:53 +0000 (05:20 +0800)
committerqydysky <qydysky@foxmail.com>
Fri, 15 Dec 2023 21:20:53 +0000 (05:20 +0800)
Reply/stream.go

index 89940d11c71a50b3fab06250a6b858bde4915c85..1631e59393236fac16c36c569c5bdafda1ac0ee4 100644 (file)
@@ -428,12 +428,12 @@ func (t *M4SStream) fetchParseM3U8(fmp4ListUpdateTo float64) (m4s_links []*m4s_l
                        return
                }
 
-               // æ£\80æ\9f¥æ\98¯å\90¦æ\9c\8då\8a¡å\99¨å\8f\91ç\94\9fæ\95\85é\9a\9c,产å\87ºå¤\9a个å\88\87ç\89\87
+               // æ£\80æ\9f¥æ\98¯å\90¦æ\9c\8då\8a¡å\99¨å\8f\91ç\94\9fæ\95\85é\9a\9c,产å\87ºå\88\87ç\89\87é\94\99误
                if t.last_m4s != nil {
                        timed := tmp[len(tmp)-1].createdTime.Sub(t.last_m4s.createdTime).Seconds()
                        nos, _ := tmp[len(tmp)-1].getNo()
                        noe, _ := t.last_m4s.getNo()
-                       if timed > 5 && nos-noe == 0 {
+                       if (timed > 5 && nos-noe == 0) || (nos-noe > 50) {
                                // 1min后重新启用
                                t.common.Live[k].DisableAuto()
                                t.log.L("W: ", fmt.Sprintf("服务器 %s 发生故障 %d 秒产出了 %d 切片", F.ParseHost(v.Url), int(timed), nos-noe))