1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-05-02 16:56:51 +08:00

Merge pull request #997 from hgjazhgj/master

Fix: reconnect when device offline
This commit is contained in:
LmeSzinc
2022-04-09 01:34:41 +08:00
committed by GitHub

View File

@@ -100,6 +100,16 @@ def handle_adb_error(e):
# Disconnect and re-connect should fix this.
logger.error(e)
return True
elif 'device offline' in text:
# AdbError(device offline)
# When a device that has been connected wirelessly is disconnected passively,
# it does not disappear from the adb device list,
# but will be displayed as offline.
# In many cases, such as disconnection and recovery caused by network fluctuations,
# or after VMOS reboot when running Alas on a phone,
# the device is still available, but it needs to be disconnected and re-connected.
logger.error(e)
return True
else:
# AdbError(device offline)
# AdbError()