mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
bpo-31234: Fix dangling thread in test_ftplib (#3544)
Clear also self.server_thread attribute in TestTimeouts.tearDown().
This commit is contained in:
parent
d165e14e29
commit
b157ce1e58
1 changed files with 2 additions and 0 deletions
|
@ -988,6 +988,8 @@ class TestTimeouts(TestCase):
|
|||
def tearDown(self):
|
||||
ftplib.FTP.port = self.old_port
|
||||
self.server_thread.join()
|
||||
# Explicitly clear the attribute to prevent dangling thread
|
||||
self.server_thread = None
|
||||
|
||||
def server(self):
|
||||
# This method sets the evt 3 times:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue