diff options
author | Sean Quah <8349537+squahtx@users.noreply.github.com> | 2021-10-27 13:04:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-27 13:04:56 +0100 |
commit | f3a4be870092e28531957702931c5d74b9d1f18f (patch) | |
tree | 4411aa447a1f8436159d70d77e80021b85e849c6 /synapse | |
parent | Fix thread BG update to not seq scan event_json (#11192) (diff) | |
download | synapse-f3a4be870092e28531957702931c5d74b9d1f18f.tar.xz |
Shut down the DNS threadpool (#11190)
The DNS threadpool must be explicitly stopped, otherwise Synapse will hang indefinitely when asked to shut down.
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/app/_base.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/synapse/app/_base.py b/synapse/app/_base.py index 03627cdcba..f4c3f867a8 100644 --- a/synapse/app/_base.py +++ b/synapse/app/_base.py @@ -346,6 +346,7 @@ async def start(hs: "HomeServer"): # 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) reactor.installNameResolver( GAIResolver(reactor, getThreadPool=lambda: resolver_threadpool) ) |