mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-17 18:01:26 +08:00
Merge pull request #2332 from LittleFall/fix/stop-not-fail
fix: 修复手动终止任务时有概率出现的“任务出错”
This commit is contained in:
@@ -263,7 +263,9 @@ void Assistant::working_proc()
|
||||
}
|
||||
lock.unlock();
|
||||
|
||||
task_callback(ret ? AsstMsg::TaskChainCompleted : AsstMsg::TaskChainError, callback_json, this);
|
||||
// We don't consider a task failed when user stop it.
|
||||
auto msg = ret || m_thread_idle ? AsstMsg::TaskChainCompleted : AsstMsg::TaskChainError;
|
||||
task_callback(msg, callback_json, this);
|
||||
|
||||
if (!m_thread_idle && m_tasks_list.empty()) {
|
||||
callback_json["finished_tasks"] = json::array(finished_tasks);
|
||||
|
||||
Reference in New Issue
Block a user