mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-16 06:25:24 +00:00
Fix: [ALAS] Release cache after adb_restart()
This commit is contained in:
parent
73a84d10d2
commit
8d9e39fe5b
@ -687,17 +687,19 @@ class Connection(ConnectionAttr):
|
||||
# No adb connect if over http
|
||||
return True
|
||||
|
||||
def adb_disconnect(self):
|
||||
msg = self.adb_client.disconnect(self.serial)
|
||||
if msg:
|
||||
logger.info(msg)
|
||||
|
||||
def release_resource(self):
|
||||
del_cached_property(self, 'hermit_session')
|
||||
del_cached_property(self, 'droidcast_session')
|
||||
del_cached_property(self, '_minitouch_builder')
|
||||
del_cached_property(self, '_maatouch_builder')
|
||||
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):
|
||||
"""
|
||||
Reboot adb client
|
||||
@ -707,6 +709,7 @@ class Connection(ConnectionAttr):
|
||||
self.adb_client.server_kill()
|
||||
# Init adb client
|
||||
del_cached_property(self, 'adb_client')
|
||||
self.release_resource()
|
||||
_ = self.adb_client
|
||||
|
||||
@Config.when(DEVICE_OVER_HTTP=False)
|
||||
|
Loading…
Reference in New Issue
Block a user