summaryrefslogtreecommitdiffstats
path: root/Lib/ssl.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/ssl.py')
-rw-r--r--Lib/ssl.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/ssl.py b/Lib/ssl.py
index 0ebef58..3ee3d6a 100644
--- a/Lib/ssl.py
+++ b/Lib/ssl.py
@@ -320,7 +320,9 @@ class SSLSocket(socket):
from the socket module."""
self._makefile_refs += 1
- return _fileobject(self, mode, bufsize)
+ # close=True so as to decrement the reference count when done with
+ # the file-like object.
+ return _fileobject(self, mode, bufsize, close=True)