set shutdown_timeout on TCPSite

This commit is contained in:
Victor Shyba 2019-05-09 00:27:53 -03:00
parent 9bb7b0571e
commit ec07037e88

View file

@ -403,7 +403,7 @@ class Daemon(metaclass=JSONRPCServerType):
await self.runner.setup()
try:
site = web.TCPSite(self.runner, self.conf.api_host, self.conf.api_port)
site = web.TCPSite(self.runner, self.conf.api_host, self.conf.api_port, shutdown_timeout=.5)
await site.start()
log.info('lbrynet API listening on TCP %s:%i', *site._server.sockets[0].getsockname()[:2])
except OSError as e: