mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-17 01:59:33 +08:00
fix: 修复没有curl时上传任务一直卡住的问题
fix https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues/3096
This commit is contained in:
@@ -91,12 +91,15 @@ void asst::ReportDataTask::report_to_penguin()
|
||||
"ReportToPenguinStats", Config.get_options().penguin_report.cmd_format,
|
||||
[](const http::Response& response) -> bool { return response.success(); },
|
||||
[&](const http::Response& response) -> bool {
|
||||
bool cond = !response.status_code() || response.status_5xx();
|
||||
if (cond) {
|
||||
if (!response.status_code()) {
|
||||
return true;
|
||||
}
|
||||
if (response.status_5xx()) {
|
||||
backoff = static_cast<int>(backoff * 1.5);
|
||||
sleep(backoff);
|
||||
return true;
|
||||
}
|
||||
return cond;
|
||||
return false;
|
||||
},
|
||||
false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user