diff options
Diffstat (limited to 'python2')
| -rw-r--r-- | python2/httplib2/__init__.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/python2/httplib2/__init__.py b/python2/httplib2/__init__.py index 567e24e..f01e931 100644 --- a/python2/httplib2/__init__.py +++ b/python2/httplib2/__init__.py @@ -876,6 +876,18 @@ the same interface as FileCache.""" except httplib.HTTPException: # Just because the server closed the connection doesn't apparently mean # that the server didn't send a response. + if conn.sock is None: + if i == 0: + conn.close() + conn.connect() + continue + else: + conn.close() + raise + if i == 0: + conn.close() + conn.connect() + continue pass try: response = conn.getresponse() |
