We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents cfdba1c + aa4cc0b commit 438d3d7Copy full SHA for 438d3d7
src/LittleForker/ProcessSupervisor.cs
@@ -312,12 +312,7 @@ private async Task OnStop(TimeSpan? timeout)
312
// only means the process has _started_ to shut down.
313
314
await CooperativeShutdown.SignalExit(ProcessInfo.Id, _loggerFactory).TimeoutAfter(timeout.Value);
315
- var exited = this.WhenStateIs(State.ExitedSuccessfully);
316
- var exitedWithError = this.WhenStateIs(State.ExitedWithError);
317
-
318
- await Task
319
- .WhenAny(exited, exitedWithError)
320
- .TimeoutAfter(timeout.Value);
+ await this.WhenStateIs(State.ExitedSuccessfully).TimeoutAfter(timeout.Value);
321
}
322
catch (TimeoutException)
323
{
0 commit comments