Fixes issue 96.
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 @@
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()