From b88bd5d44d327426b98fb63fa0888c34768fb352 Mon Sep 17 00:00:00 2001 From: Michael H Date: Fri, 17 Jan 2020 17:07:34 -0500 Subject: [PATCH] More exit tweaks (#3392) --- redbot/__main__.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/redbot/__main__.py b/redbot/__main__.py index 77c01ba52..2bf085f7d 100644 --- a/redbot/__main__.py +++ b/redbot/__main__.py @@ -490,14 +490,13 @@ def main(): # Allows transports to close properly, and prevent new ones from being opened. # Transports may still not be closed correcly on windows, see below loop.run_until_complete(loop.shutdown_asyncgens()) - if os.name == "nt": - # *we* aren't cleaning up more here, but it prevents - # a runtime error at the event loop on windows - # with resources which require longer to clean up. - # With other event loops, a failure to cleanup prior to here - # results in a resource warning instead and does not break us. - log.info("Please wait, cleaning up a bit more") - loop.run_until_complete(asyncio.sleep(1)) + # *we* aren't cleaning up more here, but it prevents + # a runtime error at the event loop on windows + # with resources which require longer to clean up. + # With other event loops, a failure to cleanup prior to here + # results in a resource warning instead + log.info("Please wait, cleaning up a bit more") + loop.run_until_complete(asyncio.sleep(2)) loop.stop() loop.close() exit_code = red._shutdown_mode if red is not None else 1