mirror of
https://github.com/Xpl0itU/WiiUDownloader.git
synced 2025-05-09 13:52:02 -04:00
Fix
This commit is contained in:
parent
6eb393f4f9
commit
624c96b7e8
1 changed files with 3 additions and 3 deletions
|
@ -78,13 +78,13 @@ func downloadFile(ctx context.Context, progressReporter ProgressReporter, client
|
|||
}
|
||||
|
||||
if resp.StatusCode() != fasthttp.StatusOK {
|
||||
resp.CloseBodyStream()
|
||||
fasthttp.ReleaseRequest(req)
|
||||
fasthttp.ReleaseResponse(resp)
|
||||
if doRetries && attempt < maxRetries {
|
||||
time.Sleep(retryDelay)
|
||||
continue
|
||||
}
|
||||
resp.CloseBodyStream()
|
||||
fasthttp.ReleaseRequest(req)
|
||||
fasthttp.ReleaseResponse(resp)
|
||||
return fmt.Errorf("download error after %d attempts, status code: %d", attempt, resp.StatusCode())
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue