feat: core 不对连接的 call_command 进行重试

This commit is contained in:
zzyyyl
2022-09-18 12:57:58 +08:00
parent 9eda6682d5
commit dafe0e357e

View File

@@ -1021,7 +1021,7 @@ bool asst::Controller::connect(const std::string& adb_path, const std::string& a
/* connect */
{
m_adb.connect = cmd_replace(adb_cfg.connect);
auto connect_ret = call_command(m_adb.connect, 60LL * 1000);
auto connect_ret = call_command(m_adb.connect, 60LL * 1000, false, false /* adb 连接时不允许重试 */);
// 端口即使错误命令仍然会返回0TODO 对connect_result进行判断
bool is_connect_success = false;
if (connect_ret) {
@@ -1040,7 +1040,7 @@ bool asst::Controller::connect(const std::string& adb_path, const std::string& a
/* get uuid (imei) */
{
auto uuid_ret = call_command(cmd_replace(adb_cfg.uuid));
auto uuid_ret = call_command(cmd_replace(adb_cfg.uuid), 20000, false, false /* adb 连接时不允许重试 */);
if (!uuid_ret) {
json::value info = get_info_json() | json::object {
{ "what", "ConnectFailed" },