]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
iostream_test: Improve cleanup
authorBen Darnell <ben@bendarnell.com>
Mon, 17 Feb 2020 21:11:23 +0000 (16:11 -0500)
committerBen Darnell <ben@bendarnell.com>
Wed, 2 Sep 2020 15:10:13 +0000 (11:10 -0400)
Closing the file descriptor without removing the corresponding handler
is technically incorrect, although the default IOLoops don't have a
problem with it.

tornado/test/iostream_test.py

index 7e400c7502d4bd55b41ed725fac041b70318d1f4..ecab4cc9e9540304f77521b7a3021a05c8cb094c 100644 (file)
@@ -943,6 +943,7 @@ class TestIOStreamStartTLS(AsyncTestCase):
             self.server_stream.close()
         if self.client_stream is not None:
             self.client_stream.close()
+        self.io_loop.remove_handler(self.listener.fileno())
         self.listener.close()
         super(TestIOStreamStartTLS, self).tearDown()