From d1c862ffa73b222746035155817d2516c4f5b71e Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 3 May 2017 03:47:34 +0200 Subject: [PATCH] bpo-30199: test_ssl closes all asyncore channels (#1381) (#1408) AsyncoreEchoServer of test_ssl now calls asyncore.close_all(ignore_all=True) to ensure that asyncore.socket_map is cleared once the test completes, even if ConnectionHandler was not correctly unregistered. Fix the following warning: Warning -- asyncore.socket_map was modified by test_ssl Before: {} After: {6: } (cherry picked from commit 1dae7450c68bad498e57800387b24cb103c461fa) --- Lib/test/test_ssl.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index a1258c65a576..2f98cf145508 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -1955,6 +1955,8 @@ else: self.join() if support.verbose: sys.stdout.write(" cleanup: successfully joined.\n") + # make sure that ConnectionHandler is removed from socket_map + asyncore.close_all(ignore_all=True) def start(self, flag=None): self.flag = flag -- 2.47.3