aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/downloader/http.py
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2021-10-20 11:45:20 -0500
committerJesús <heckyel@hyperbola.info>2021-10-20 11:45:20 -0500
commitc7afb25e19a91493db6069d1db9f7d1bc8491dc1 (patch)
treed4f4d0a125e191585af49dcfb189d2f1ba9acf17 /yt_dlp/downloader/http.py
parent000d2844fd93d8c35fc74d22588291e7c7d742fa (diff)
parentd3c93ec2b7f5bcb872b0afb169efaa2f1abdf6e2 (diff)
downloadhypervideo-pre-c7afb25e19a91493db6069d1db9f7d1bc8491dc1.tar.lz
hypervideo-pre-c7afb25e19a91493db6069d1db9f7d1bc8491dc1.tar.xz
hypervideo-pre-c7afb25e19a91493db6069d1db9f7d1bc8491dc1.zip
updated from upstream | 20/10/2021 at 11:45
Diffstat (limited to 'yt_dlp/downloader/http.py')
-rw-r--r--yt_dlp/downloader/http.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/yt_dlp/downloader/http.py b/yt_dlp/downloader/http.py
index 2e95bb9d1..6290884a8 100644
--- a/yt_dlp/downloader/http.py
+++ b/yt_dlp/downloader/http.py
@@ -191,11 +191,13 @@ class HttpFD(FileDownloader):
# Unexpected HTTP error
raise
raise RetryDownload(err)
+ except socket.timeout as err:
+ raise RetryDownload(err)
except socket.error as err:
- if err.errno != errno.ECONNRESET:
+ if err.errno in (errno.ECONNRESET, errno.ETIMEDOUT):
# Connection reset is no problem, just retry
- raise
- raise RetryDownload(err)
+ raise RetryDownload(err)
+ raise
def download():
nonlocal throttle_start