Unverified Commit cdc55e66 authored by Sergey M․'s avatar Sergey M․
Browse files

[downloader/http] Improve timeout detection when reading block of data (refs #10935)

parent 86b7c00a
...@@ -238,9 +238,11 @@ class HttpFD(FileDownloader): ...@@ -238,9 +238,11 @@ class HttpFD(FileDownloader):
except socket.timeout as e: except socket.timeout as e:
retry(e) retry(e)
except socket.error as e: except socket.error as e:
if e.errno not in (errno.ECONNRESET, errno.ETIMEDOUT): # SSLError on python 2 (inherits socket.error) may have
raise # no errno set but this error message
retry(e) if e.errno in (errno.ECONNRESET, errno.ETIMEDOUT) or getattr(e, 'message') == 'The read operation timed out':
byte_counter += len(data_block) byte_counter += len(data_block)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment