Skip to content

Commit

Permalink
Fix: Avoid to wait so long time to stop guest_api process. Put a time…
Browse files Browse the repository at this point in the history
…out of 10 seconds.
  • Loading branch information
nesitor committed Feb 14, 2024
1 parent 7ee90f8 commit 4426384
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/aleph/vm/controllers/firecracker/executable.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,8 @@ async def start_guest_api(self):
logger.debug(f"started guest API for {self.vm_id}")

async def stop_guest_api(self):
if self.guest_api_process and self.guest_api_process._popen:
self.guest_api_process.terminate()
if self.guest_api_process and self.guest_api_process.is_alive():
self.guest_api_process.join(timeout=10)

async def teardown(self):
if self.fvm:
Expand Down

0 comments on commit 4426384

Please sign in to comment.