修复不能滑动的bug
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user