1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-12 14:27:00 +08:00

Opt: [ALAS] Dynamically extends nemu_ipc timeout on retries for slow PCs

This commit is contained in:
LmeSzinc
2024-12-27 23:45:00 +08:00
parent a6f81729e5
commit 3d112b4c6c
13 changed files with 32 additions and 18 deletions

View File

@@ -154,16 +154,16 @@ class ImageTruncated(Exception):
def retry_sleep(trial):
# First trial
if trial == 0:
pass
return 0
# Failed once, fast retry
elif trial == 1:
pass
return 0
# Failed twice
elif trial == 2:
time.sleep(1)
return 1
# Failed more
else:
time.sleep(RETRY_DELAY)
return RETRY_DELAY
def handle_adb_error(e):