summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2024-06-19 11:00:08 +0100
committerErik Johnston <erik@matrix.org>2024-06-19 11:00:08 +0100
commit4f914820927b2da13f65cfcd0ba27fdf4b7cd0ce (patch)
treee6d0719189a1649467a906b0cdd2573df8a1c5c9 /synapse
parentMake warning (diff)
downloadsynapse-4f914820927b2da13f65cfcd0ba27fdf4b7cd0ce.tar.xz
Diffstat (limited to 'synapse')
-rw-r--r--synapse/app/_base.py8
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)
     )