app: resolve soft restart issues

Clear the API cache when closing to purge stale callbacks.  In addition,
explicitly delte the server object after the eventloop stops.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan
2023-12-29 08:11:47 -05:00
parent c4d15e40a8
commit 5585884d26
3 changed files with 6 additions and 0 deletions

View File

@@ -641,6 +641,7 @@ def main(from_package: bool = True) -> None:
# it is ok to use a blocking sleep here
time.sleep(.5)
logging.info("Attempting Server Restart...")
del server
event_loop.reset()
event_loop.close()
logging.info("Server Shutdown")