make waiting for the server to start robust
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py
index 2a5283c..b9825cd 100644
--- a/Lib/test/test_logging.py
+++ b/Lib/test/test_logging.py
@@ -1574,7 +1574,7 @@
         port = find_unused_port()
         t = logging.config.listen(port)
         t.start()
-        time.sleep(0.5) # give server thread some time to get ready
+        t.ready.wait()
         try:
             sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
             sock.settimeout(2.0)