Kaydet (Commit) b157ce1e authored tarafından Victor Stinner's avatar Victor Stinner Kaydeden (comit) GitHub

bpo-31234: Fix dangling thread in test_ftplib (#3544)

Clear also self.server_thread attribute in TestTimeouts.tearDown().
üst d165e14e
...@@ -988,6 +988,8 @@ class TestTimeouts(TestCase): ...@@ -988,6 +988,8 @@ class TestTimeouts(TestCase):
def tearDown(self): def tearDown(self):
ftplib.FTP.port = self.old_port ftplib.FTP.port = self.old_port
self.server_thread.join() self.server_thread.join()
# Explicitly clear the attribute to prevent dangling thread
self.server_thread = None
def server(self): def server(self):
# This method sets the evt 3 times: # This method sets the evt 3 times:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment