Skip to content

Commit c4c420e

Browse files
committed
Retry media downloads on HTTP2 errors
1 parent 46bcca7 commit c4c420e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

download.go

+1
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ func shouldRetryMediaDownload(err error) bool {
269269
var netErr net.Error
270270
var httpErr DownloadHTTPError
271271
return errors.As(err, &netErr) ||
272+
strings.HasPrefix(err.Error(), "stream error:") || // hacky check for http2 errors
272273
(errors.As(err, &httpErr) && retryafter.Should(httpErr.StatusCode, true))
273274
}
274275

0 commit comments

Comments
 (0)