Skip to content

Commit

Permalink
Abort log
Browse files Browse the repository at this point in the history
  • Loading branch information
lemaitre-aneo committed Apr 15, 2024
1 parent 33a44de commit ceea81a
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ public sealed override async Task<ProcessReply> Process(ProcessRequest reques
}
else
{
logger_.LogInformation("RPC request was aborted");

// Request has been cancelled
// Wait for process to be properly cancelled, or small delay
task = await Task.WhenAny(process,
Expand All @@ -143,6 +145,8 @@ public sealed override async Task<ProcessReply> Process(ProcessRequest reques
}
else
{
logger_.LogError("Stopping the worker as processing has not stopped");

// Task did not finish upon cancellation
// Abort the whole worker to ensure the task does not continue running
Environment.Exit(AbortReturnCode);
Expand Down

0 comments on commit ceea81a

Please sign in to comment.