Skip to content

Commit 438d3d7

Browse files
authored
Merge pull request #104 from damianh/exited-successfully-only
Stop waiting on ExitedWithError
2 parents cfdba1c + aa4cc0b commit 438d3d7

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/LittleForker/ProcessSupervisor.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -312,12 +312,7 @@ private async Task OnStop(TimeSpan? timeout)
312312
// only means the process has _started_ to shut down.
313313

314314
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);
315+
await this.WhenStateIs(State.ExitedSuccessfully).TimeoutAfter(timeout.Value);
321316
}
322317
catch (TimeoutException)
323318
{

0 commit comments

Comments
 (0)