修复不能滑动的bug

This commit is contained in:
2025-11-03 19:08:25 +08:00
parent 0ccd4ee97c
commit 740f45b88b
12 changed files with 33 additions and 77 deletions

View File

@@ -136,7 +136,6 @@ class DeviceInfo:
# =============== 核心端口连通性检测HTTP 方式) =================
def _is_local_port_open(self, port: int, udid: str, timeout: float = 5) -> bool:
print("开始HTTP方式检测端口")
"""
使用 HTTP 方式检测:向 http://127.0.0.1:port/ 发送一次 HEAD 请求。
只要建立连接并收到合法的 HTTP 响应(任意 1xx~5xx 状态码),即认为 HTTP 可达。
@@ -156,7 +155,6 @@ class DeviceInfo:
conn.close()
# 任何合法 HTTP 状态码都说明“HTTP 服务在监听且可交互”,包括 404/401/403/5xx
if 100 <= status <= 599:
print(f"HTTP端口正常status={status}")
return True
else:
LogManager.error(f"HTTP状态码异常: {status}", udid=udid)
@@ -170,7 +168,6 @@ class DeviceInfo:
# =============== 一轮检查:发现不通就移除 =================
def check_iproxy_ports(self, connect_timeout: float = 3) -> None:
time.sleep(20)
print("开始监听投屏端口")
while True:
snapshot = list(self._models.items()) # [(deviceId, DeviceModel), ...]
for device_id, model in snapshot: