mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-01 01:36:05 -04:00
Shut down the DNS threadpool (#11190)
The DNS threadpool must be explicitly stopped, otherwise Synapse will hang indefinitely when asked to shut down.
This commit is contained in:
parent
72626b78ef
commit
f3a4be8700
1
changelog.d/11190.bugfix
Normal file
1
changelog.d/11190.bugfix
Normal file
@ -0,0 +1 @@
|
||||
Fix a performance regression introduced in 1.44.0 which could cause client requests to time out when making large numbers of outbound requests.
|
@ -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)
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user