Skip to content

Commit

Permalink
Fix rare server state case
Browse files Browse the repository at this point in the history
  • Loading branch information
emnigma committed Aug 8, 2023
1 parent 66c8fe7 commit 16dc283
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions VSharp.ML.AIAgent/launch_servers.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ async def enqueue_instance(request):
logging.info(
f"Waiting for server to die, {wait_for_reset_retries} retries left"
)
if (
psutil.Process(returned_instance_info.pid).status()
!= psutil.STATUS_RUNNING
if psutil.Process(returned_instance_info.pid).status() in (
psutil.STATUS_DEAD,
psutil.STATUS_ZOMBIE,
):
break
time.sleep(FeatureConfig.ON_GAME_SERVER_RESTART.wait_for_reset_time)
Expand Down

0 comments on commit 16dc283

Please sign in to comment.