diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2017-09-13 06:43:58 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-13 06:43:58 -0700 |
commit | b157ce1e58b03988ce4340a55d0b856125833cc5 (patch) | |
tree | 29eea84067b5c0256359ca07a06b6a16f427455d | |
parent | d165e14e29b45a22450263722f5c2c386c3a748a (diff) | |
download | cpython-git-b157ce1e58b03988ce4340a55d0b856125833cc5.tar.gz |
bpo-31234: Fix dangling thread in test_ftplib (#3544)
Clear also self.server_thread attribute in TestTimeouts.tearDown().
-rw-r--r-- | Lib/test/test_ftplib.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_ftplib.py b/Lib/test/test_ftplib.py index 372282b4fa..5880a1e941 100644 --- a/Lib/test/test_ftplib.py +++ b/Lib/test/test_ftplib.py @@ -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: |