summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Weißschuh <thomas@t-8ch.de>2015-05-09 07:56:49 +0000
committerThomas Weißschuh <thomas@t-8ch.de>2015-05-09 07:56:49 +0000
commit90946207d2aedd41fcfcf8e6d68b07fa5a834ada (patch)
treed56e6803d58cef4a790306c08e21317c23eadcb4
parenta91975b77a2e28394859487fe5ebbf4a3a74e634 (diff)
downloadurllib3-90946207d2aedd41fcfcf8e6d68b07fa5a834ada.tar.gz
close != shutdown
fixes #612, see #613
-rw-r--r--urllib3/contrib/pyopenssl.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/urllib3/contrib/pyopenssl.py b/urllib3/contrib/pyopenssl.py
index b2c34a89..c4de3359 100644
--- a/urllib3/contrib/pyopenssl.py
+++ b/urllib3/contrib/pyopenssl.py
@@ -208,9 +208,13 @@ class WrappedSocket(object):
sent = self._send_until_done(data)
data = data[sent:]
+ def shutdown(self):
+ # FIXME rethrow compatible exceptions should we ever use this
+ self.connection.shutdown()
+
def close(self):
if self._makefile_refs < 1:
- return self.connection.shutdown()
+ return self.connection.close()
else:
self._makefile_refs -= 1