Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Ralf
youtube-dl
Commits
cdc55e66
Unverified
Commit
cdc55e66
authored
Sep 18, 2020
by
Sergey M․
Browse files
[downloader/http] Improve timeout detection when reading block of data (refs #10935)
parent
86b7c00a
Changes
1
Hide whitespace changes
Inline
Side-by-side
youtube_dl/downloader/http.py
View file @
cdc55e66
...
...
@@ -238,9 +238,11 @@ class HttpFD(FileDownloader):
except
socket
.
timeout
as
e
:
retry
(
e
)
except
socket
.
error
as
e
:
if
e
.
errno
not
in
(
errno
.
ECONNRESET
,
errno
.
ETIMEDOUT
):
raise
retry
(
e
)
# SSLError on python 2 (inherits socket.error) may have
# no errno set but this error message
if
e
.
errno
in
(
errno
.
ECONNRESET
,
errno
.
ETIMEDOUT
)
or
getattr
(
e
,
'message'
)
==
'The read operation timed out'
:
retry
(
e
)
raise
byte_counter
+=
len
(
data_block
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment