|
@@ -237,7 +237,7 @@ def get_all_ip_addresses():
|
|
|
return ["localhost"]
|
|
|
|
|
|
|
|
|
-async def shutdown(signal, loop, node):
|
|
|
+async def shutdown(signal, loop, server):
|
|
|
"""Gracefully shutdown the server and close the asyncio loop."""
|
|
|
print(f"Received exit signal {signal.name}...")
|
|
|
print("Thank you for using exo.")
|
|
@@ -246,7 +246,7 @@ async def shutdown(signal, loop, node):
|
|
|
[task.cancel() for task in server_tasks]
|
|
|
print(f"Cancelling {len(server_tasks)} outstanding tasks")
|
|
|
await asyncio.gather(*server_tasks, return_exceptions=True)
|
|
|
- await node.server.stop()
|
|
|
+ await server.stop()
|
|
|
|
|
|
|
|
|
def is_frozen():
|