Skip to content

Commit b0a4f65

Browse files
gh-128002: fix tsan race in closing socket in test_ssl (#131397)
1 parent 77d2fd4 commit b0a4f65

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

Lib/test/test_asyncio/test_ssl.py

+5-7
Original file line numberDiff line numberDiff line change
@@ -1849,16 +1849,14 @@ def stop(self):
18491849
pass
18501850
finally:
18511851
super().stop()
1852-
1853-
def run(self):
1854-
try:
1855-
with self._sock:
1856-
self._sock.setblocking(False)
1857-
self._run()
1858-
finally:
1852+
self._sock.close()
18591853
self._s1.close()
18601854
self._s2.close()
18611855

1856+
def run(self):
1857+
self._sock.setblocking(False)
1858+
self._run()
1859+
18621860
def _run(self):
18631861
while self._active:
18641862
if self._clients >= self._max_clients:

0 commit comments

Comments
 (0)