summaryrefslogtreecommitdiff
path: root/Lib/socket.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/socket.py')
-rw-r--r--Lib/socket.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/socket.py b/Lib/socket.py
index 781887583c..30a01aa198 100644
--- a/Lib/socket.py
+++ b/Lib/socket.py
@@ -172,10 +172,12 @@ class socket(_socket.socket):
if self._closed:
self.close()
- def _real_close(self):
- _socket.socket.close(self)
+ def _real_close(self, _ss=_socket.socket):
+ # This function should not reference any globals. See Issue808164
+ _ss.close(self)
def close(self):
+ # This function should not reference any globals. See Issue808164
self._closed = True
if self._io_refs <= 0:
self._real_close()