From ce6abe0f0da2fd79cff23fca30494d818e2d0076 Mon Sep 17 00:00:00 2001 From: MistEO Date: Mon, 23 Jan 2023 22:12:00 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=B0=86adb=E9=87=8D=E8=BF=9E?= =?UTF-8?q?=E7=9A=84=E9=87=8D=E8=AF=95=E6=AC=A1=E6=95=B0=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E5=88=B05?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MaaCore/Controller.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/MaaCore/Controller.cpp b/src/MaaCore/Controller.cpp index 0233968673..29d62f0655 100644 --- a/src/MaaCore/Controller.cpp +++ b/src/MaaCore/Controller.cpp @@ -149,7 +149,7 @@ std::optional asst::Controller::call_command(const std::string& cmd { "cmd", cmd }, } }, }; - static constexpr int ReconnectTimes = 20; + static constexpr int ReconnectTimes = 5; for (int i = 0; i < ReconnectTimes; ++i) { if (need_exit()) { break; @@ -1639,10 +1639,8 @@ std::optional asst::Controller::call_command_tcpip(const std::string& cmd, } // TODO: 实现 timeout,目前暂时忽略 - if (false) { - timeout; - start_time; - } + std::ignore = timeout; + std::ignore = start_time; static const std::regex devices_regex(R"(^.+ devices$)"); static const std::regex release_regex(R"(^.+ kill-server$)");