mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-16 17:57:01 +08:00
perf: 调整上传线程退出时机
This commit is contained in:
@@ -108,9 +108,6 @@ asst::http::Response asst::ReportDataTask::report(const std::string& subtask, co
|
||||
|
||||
http::Response response;
|
||||
for (int i = 0; i <= m_retry_times; ++i) {
|
||||
if (need_exit()) {
|
||||
return {};
|
||||
}
|
||||
response = escape_and_request(format);
|
||||
if (success_cond(response)) {
|
||||
callback(AsstMsg::SubTaskCompleted, cb_info);
|
||||
@@ -122,6 +119,9 @@ asst::http::Response asst::ReportDataTask::report(const std::string& subtask, co
|
||||
else {
|
||||
Log.trace("retrying... | why:", response.get_last_error(), "status_code:", response.status_code());
|
||||
}
|
||||
if (need_exit()) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
cb_info["why"] = "上报失败";
|
||||
|
||||
Reference in New Issue
Block a user