mirror of
https://github.com/actions/runner.git
synced 2025-12-12 15:13:30 +00:00
fix race condition. (#538)
This commit is contained in:
@@ -346,9 +346,6 @@ namespace GitHub.Runner.Sdk
|
|||||||
// data buffers one last time before returning
|
// data buffers one last time before returning
|
||||||
ProcessOutput();
|
ProcessOutput();
|
||||||
|
|
||||||
Trace.Info($"Finished process {_proc.Id} with exit code {_proc.ExitCode}, and elapsed time {_stopWatch.Elapsed}.");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cancellationToken.IsCancellationRequested)
|
if (cancellationToken.IsCancellationRequested)
|
||||||
{
|
{
|
||||||
// Ensure cancellation also finish on the cancellationToken.Register thread.
|
// Ensure cancellation also finish on the cancellationToken.Register thread.
|
||||||
@@ -356,6 +353,9 @@ namespace GitHub.Runner.Sdk
|
|||||||
Trace.Info($"Process Cancellation finished.");
|
Trace.Info($"Process Cancellation finished.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Trace.Info($"Finished process {_proc.Id} with exit code {_proc.ExitCode}, and elapsed time {_stopWatch.Elapsed}.");
|
||||||
|
}
|
||||||
|
|
||||||
cancellationToken.ThrowIfCancellationRequested();
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
|
|
||||||
// Wait for process to finish.
|
// Wait for process to finish.
|
||||||
|
|||||||
Reference in New Issue
Block a user