mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-16 17:57:01 +08:00
perf: 优化 connect 逻辑 (#10571)
* chore: 优化 connect 对实体设备和已有错误路径下自动检测的支持 * perf: 优化 core 对 connect 成功的判断逻辑 may fix 类似 #10426 的异常情况
This commit is contained in:
@@ -761,7 +761,9 @@ bool asst::AdbController::connect(
|
||||
bool is_connect_success = false;
|
||||
if (connect_ret) {
|
||||
auto& connect_str = connect_ret.value();
|
||||
is_connect_success = connect_str.find("error") == std::string::npos;
|
||||
// 检查连接字符串是否包含 "connected" 或 "device"
|
||||
is_connect_success = connect_str.find("connected") != std::string::npos ||
|
||||
connect_str.find("device") != std::string::npos;
|
||||
if (connect_str.find("daemon started successfully") != std::string::npos
|
||||
&& connect_str.find("daemon still not running") == std::string::npos) {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user