Skip to content

WaitForExitAsync: Handle timeout exception when timeout parameter set #505

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rudraptpsingh
Copy link
Contributor

No description provided.

@@ -365,6 +365,10 @@ public virtual async Task WaitForExitAsync(CancellationToken cancellationToken,
{
// Expected whenever the CancellationToken receives a cancellation request.
}
catch (TimeoutException) when (timeout != null)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should NOT be swallowed here. There are upstream cases where the caller of this logic needs to know if the process did not actually complete within the timeout allotted. TimeoutException should be handled in the calling locations, not the core method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants