https://github.com/python/cpython/commit/ab6333f7f56554bfd6c01eff567ddfb163a3dae6
commit: ab6333f7f56554bfd6c01eff567ddfb163a3dae6
branch: main
author: Kumar Aditya <[email protected]>
committer: kumaraditya303 <[email protected]>
date: 2025-03-18T16:20:47+05:30
summary:
gh-128002: fix tsan race in closing socket in `test_sslproto` (#131399)
files:
M Lib/test/test_asyncio/functional.py
diff --git a/Lib/test/test_asyncio/functional.py
b/Lib/test/test_asyncio/functional.py
index 2934325b6dfbc7..555394b915de48 100644
--- a/Lib/test/test_asyncio/functional.py
+++ b/Lib/test/test_asyncio/functional.py
@@ -217,16 +217,15 @@ def stop(self):
pass
finally:
super().stop()
-
- def run(self):
- try:
- with self._sock:
- self._sock.setblocking(False)
- self._run()
- finally:
+ self._sock.close()
self._s1.close()
self._s2.close()
+
+ def run(self):
+ self._sock.setblocking(False)
+ self._run()
+
def _run(self):
while self._active:
if self._clients >= self._max_clients:
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]