mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-22 19:53:44 +08:00
Fix: Prevent MaaTouch stream from being deleted
This commit is contained in:
@@ -89,6 +89,7 @@ class MaaTouch(Connection):
|
|||||||
max_x: int
|
max_x: int
|
||||||
max_y: int
|
max_y: int
|
||||||
_maatouch_stream = socket.socket
|
_maatouch_stream = socket.socket
|
||||||
|
_maatouch_stream_storage = None
|
||||||
|
|
||||||
@cached_property
|
@cached_property
|
||||||
def maatouch_builder(self):
|
def maatouch_builder(self):
|
||||||
@@ -107,6 +108,8 @@ class MaaTouch(Connection):
|
|||||||
stream=True,
|
stream=True,
|
||||||
recvall=False
|
recvall=False
|
||||||
)
|
)
|
||||||
|
# Prevent shell stream from being deleted causing socket close
|
||||||
|
self._maatouch_stream_storage = stream
|
||||||
stream = stream.conn
|
stream = stream.conn
|
||||||
stream.settimeout(10)
|
stream.settimeout(10)
|
||||||
self._maatouch_stream = stream
|
self._maatouch_stream = stream
|
||||||
|
|||||||
Reference in New Issue
Block a user