mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-18 22:33:42 +00:00
fix: retry
This commit is contained in:
1 parent
046729bfaa
commit
caf9bf265b
2 files changed
+2
-11
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user