forked from LBRYCommunity/lbry-sdk
don't shut down immediately after startup
This commit is contained in:
parent
a3e64f9cef
commit
8948d5be86
1 changed files with 6 additions and 1 deletions
|
@ -173,6 +173,11 @@ def get_argument_parser():
|
||||||
return main
|
return main
|
||||||
|
|
||||||
|
|
||||||
|
async def run_daemon(daemon: Daemon):
|
||||||
|
await daemon.start()
|
||||||
|
await daemon.server.wait_closed()
|
||||||
|
|
||||||
|
|
||||||
def main(argv=None):
|
def main(argv=None):
|
||||||
argv = argv or sys.argv[1:]
|
argv = argv or sys.argv[1:]
|
||||||
parser = get_argument_parser()
|
parser = get_argument_parser()
|
||||||
|
@ -217,7 +222,7 @@ def main(argv=None):
|
||||||
log.info("Starting lbrynet-daemon from command line")
|
log.info("Starting lbrynet-daemon from command line")
|
||||||
|
|
||||||
daemon = Daemon(conf)
|
daemon = Daemon(conf)
|
||||||
asyncio.run(daemon.start())
|
asyncio.run(run_daemon(daemon))
|
||||||
|
|
||||||
elif args.command is not None:
|
elif args.command is not None:
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue