projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
acf2a6e
)
Merge pull request #4831 from light94/master
author
Philipp Hagemeister
<phihag@phihag.de>
Mon, 2 Feb 2015 11:03:28 +0000
(12:03 +0100)
committer
Philipp Hagemeister
<phihag@phihag.de>
Mon, 2 Feb 2015 11:03:28 +0000
(12:03 +0100)
Handling Connection Reset by Peer Error
youtube_dl/downloader/http.py
patch
|
blob
|
history
diff --git
a/youtube_dl/downloader/http.py
b/youtube_dl/downloader/http.py
index 8a1d578d54c6422df3b5ea768bb5a7547d52d32d..9b023c5c17e4bd29c7d4d82ce8edbfdf48522f8a 100644
(file)
--- a/
youtube_dl/downloader/http.py
+++ b/
youtube_dl/downloader/http.py
@@
-3,6
+3,9
@@
from __future__ import unicode_literals
import os
import time
+from socket import error as SocketError
+import errno
+
from .common import FileDownloader
from ..compat import (
compat_urllib_request,
@@
-99,6
+102,11
@@
class HttpFD(FileDownloader):
resume_len = 0
open_mode = 'wb'
break
+
+ except SocketError as e:
+ if e.errno != errno.ECONNRESET:
+ raise # Not error we are looking for
+ pass
# Retry
count += 1
if count <= retries: