Socket handler closed prior to end of test.
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py
index ef77e5e..01d9fc0 100644
--- a/Lib/test/test_logging.py
+++ b/Lib/test/test_logging.py
@@ -463,6 +463,7 @@
             thread.join()
         banner("logrecv output", "begin")
         sys.stdout.write(sockOut.getvalue())
+        sockhdlr.close()
         sockOut.close()
         banner("logrecv output", "end")
         sys.stdout.flush()