diff options
author | Erik Johnston <erik@matrix.org> | 2024-06-19 11:00:08 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2024-06-19 11:00:08 +0100 |
commit | 4f914820927b2da13f65cfcd0ba27fdf4b7cd0ce (patch) | |
tree | e6d0719189a1649467a906b0cdd2573df8a1c5c9 | |
parent | Make warning (diff) | |
download | synapse-erikj/time_freeze.tar.xz |
More logging github/erikj/time_freeze erikj/time_freeze
-rw-r--r-- | synapse/app/_base.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/synapse/app/_base.py b/synapse/app/_base.py index 395ec3efd7..850c63955f 100644 --- a/synapse/app/_base.py +++ b/synapse/app/_base.py @@ -532,7 +532,13 @@ async def start(hs: "HomeServer") -> None: # numbers of DNS requests don't starve out other users of the threadpool. resolver_threadpool = ThreadPool(name="gai_resolver") resolver_threadpool.start() - reactor.addSystemEventTrigger("during", "shutdown", resolver_threadpool.stop) + + def stop_threadpool() -> None: + logger.warning("Stopping thread pool...") + resolver_threadpool.stop() + logger.warning("Stopped thread pool") + + reactor.addSystemEventTrigger("during", "shutdown", stop_threadpool) reactor.installNameResolver( GAIResolver(reactor, getThreadPool=lambda: resolver_threadpool) ) |