mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-17 09:55:29 +08:00
Fix: [ALAS] Release cache after adb_restart()
(cherry picked from commit 8d9e39fe5b9f359702c527e012eb03a04901b575)
This commit is contained in:
@@ -681,17 +681,19 @@ class Connection(ConnectionAttr):
|
|||||||
# No adb connect if over http
|
# No adb connect if over http
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def adb_disconnect(self):
|
def release_resource(self):
|
||||||
msg = self.adb_client.disconnect(self.serial)
|
|
||||||
if msg:
|
|
||||||
logger.info(msg)
|
|
||||||
|
|
||||||
del_cached_property(self, 'hermit_session')
|
del_cached_property(self, 'hermit_session')
|
||||||
del_cached_property(self, 'droidcast_session')
|
del_cached_property(self, 'droidcast_session')
|
||||||
del_cached_property(self, '_minitouch_builder')
|
del_cached_property(self, '_minitouch_builder')
|
||||||
del_cached_property(self, '_maatouch_builder')
|
del_cached_property(self, '_maatouch_builder')
|
||||||
del_cached_property(self, 'reverse_server')
|
del_cached_property(self, 'reverse_server')
|
||||||
|
|
||||||
|
def adb_disconnect(self):
|
||||||
|
msg = self.adb_client.disconnect(self.serial)
|
||||||
|
if msg:
|
||||||
|
logger.info(msg)
|
||||||
|
self.release_resource()
|
||||||
|
|
||||||
def adb_restart(self):
|
def adb_restart(self):
|
||||||
"""
|
"""
|
||||||
Reboot adb client
|
Reboot adb client
|
||||||
@@ -701,6 +703,7 @@ class Connection(ConnectionAttr):
|
|||||||
self.adb_client.server_kill()
|
self.adb_client.server_kill()
|
||||||
# Init adb client
|
# Init adb client
|
||||||
del_cached_property(self, 'adb_client')
|
del_cached_property(self, 'adb_client')
|
||||||
|
self.release_resource()
|
||||||
_ = self.adb_client
|
_ = self.adb_client
|
||||||
|
|
||||||
@Config.when(DEVICE_OVER_HTTP=False)
|
@Config.when(DEVICE_OVER_HTTP=False)
|
||||||
|
|||||||
Reference in New Issue
Block a user