diff options
author | Joe Gregorio <jcgregorio@google.com> | 2011-02-11 00:28:16 -0500 |
---|---|---|
committer | Joe Gregorio <jcgregorio@google.com> | 2011-02-11 00:28:16 -0500 |
commit | 585ccbe1fe8d4f9b749f387d1791d8da3e44d0e6 (patch) | |
tree | 2e3efdeef3dbf79086a298098bfaa590651291d5 /python2 | |
parent | 5c1b00a03221f55ac48b0d34030160cf55b4225f (diff) | |
download | httplib2-585ccbe1fe8d4f9b749f387d1791d8da3e44d0e6.tar.gz |
Fixes issue 96.
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() |