Skip to content

Commit

Permalink
fix: 修正偶现PostStop后死循环问题
Browse files Browse the repository at this point in the history
  • Loading branch information
MistEO committed Mar 25, 2024
1 parent 2b202c0 commit b5c5528
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions source/MaaFramework/Task/PipelineTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ PipelineTask::RunningResult PipelineTask::find_first_and_run(
break;
}

if (need_to_stop()) {
LogInfo << "Task interrupted" << VAR(latest_hit_);
return RunningResult::Interrupted;
}

if (std::chrono::steady_clock::now() - start_time > timeout) {
LogInfo << "Task timeout" << VAR(latest_hit_) << VAR(timeout);
return RunningResult::Timeout;
Expand Down

0 comments on commit b5c5528

Please sign in to comment.