Refactor robust retry in http client
This commit is contained in:
@@ -164,8 +164,8 @@ func (dl *Downloader) streamFileToResponse(torrent *intTor.Torrent, file *intTor
|
||||
|
||||
download, err := dl.client.Do(dlReq)
|
||||
if err != nil {
|
||||
log.Warnf("Cannot download file %s: %v", unrestrict.Download, err)
|
||||
if file != nil && unrestrict.Streamable == 1 {
|
||||
log.Warnf("Cannot download file %s: %v", file.Path, err)
|
||||
if cfg.EnableRepair() && torrent != nil {
|
||||
torrent.BrokenLinks.Add(file.Link)
|
||||
file.Link = "repair"
|
||||
|
||||
Reference in New Issue
Block a user