From: Ben Darnell Date: Mon, 17 Feb 2020 21:11:23 +0000 (-0500) Subject: iostream_test: Improve cleanup X-Git-Tag: v6.1.0b1~9^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c357af92611d32e4ae8fc3c53da77831171ad18;p=thirdparty%2Ftornado.git iostream_test: Improve cleanup Closing the file descriptor without removing the corresponding handler is technically incorrect, although the default IOLoops don't have a problem with it. --- diff --git a/tornado/test/iostream_test.py b/tornado/test/iostream_test.py index 7e400c750..ecab4cc9e 100644 --- a/tornado/test/iostream_test.py +++ b/tornado/test/iostream_test.py @@ -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()