25 lines
1.0 KiB
Diff
25 lines
1.0 KiB
Diff
diff -r -U4 httplib2-0.6.0/python2/httplib2/__init__.py httplib2-0.6.0/python2/httplib2/__init__.py
|
|
--- httplib2-0.6.0/python2/httplib2/__init__.py 2010-12-18 17:05:28.000000000 +0000
|
|
+++ httplib2-0.6.0/python2/httplib2/__init__.py 2010-12-18 17:04:44.000000000 +0000
|
|
@@ -868,8 +868,20 @@
|
|
raise
|
|
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()
|
|
except (socket.error, httplib.HTTPException):
|