mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-23 10:05:55 +03:00
More logging
This commit is contained in:
parent
9e46ea43f4
commit
4f91482092
1 changed files with 7 additions and 1 deletions
|
@ -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)
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue