fix: retry

This commit is contained in:
liwei committed 2021-03-24 14:03:23 +08:00
1 parent 046729bfaa
commit caf9bf265b
2 files changed
+2 -11

No files matched your search

+2
View File
@@ -295,6 +295,8 @@ func (f *Fetcher) fetchChunk(index int) (err error) {
// 请求失败重试
continue
}
// 请求成功就重置错误次数,连续失败5次才终止
i = 0
retry, err = func() (bool, error) {
defer resp.Body.Close()
for {