[wallet server] stop executor after stopping server and wait for shutdown event
This commit is contained in:
parent
662f2bff4c
commit
9d3e1af69b
1 changed files with 2 additions and 1 deletions
|
@ -126,8 +126,9 @@ class Server:
|
|||
loop.add_signal_handler(signal.SIGINT, __exit)
|
||||
loop.add_signal_handler(signal.SIGTERM, __exit)
|
||||
loop.run_until_complete(self.start())
|
||||
loop.run_until_complete(self.shutdown_event.wait())
|
||||
except (SystemExit, KeyboardInterrupt):
|
||||
pass
|
||||
finally:
|
||||
executor.shutdown(True)
|
||||
loop.run_until_complete(self.stop())
|
||||
executor.shutdown(True)
|
||||
|
|
Loading…
Add table
Reference in a new issue