8000 gh-128002: fix tsan race in closing socket in `test_ssl` (#131397) · python/cpython@b0a4f65 · GitHub
[go: up one dir, main page]

Skip to content
Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Lines changed: 5 additions & 7 deletions
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)
0