gh-128002: fix tsan race in closing socket in test_sslproto (#131399)

This commit is contained in:
Kumar Aditya 2025-03-18 16:20:47 +05:30 committed by GitHub
parent 812074e291
commit ab6333f7f5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -217,16 +217,15 @@ class TestThreadedServer(SocketThread):
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: