Skip to content
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

Don't log or report operation cancelled exceptions #51789

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,12 @@ private async Task ProcessQueueAsync()
}
}
}
catch (OperationCanceledException e) when (e.CancellationToken == _cancelSource.Token)
catch (OperationCanceledException)
{
// If the queue is asked to shut down between the start of the while loop, and the Dequeue call
// we could end up here, but we don't want to report an error. The Shutdown call will take care of things.
// If we're being cancelled then we shut down but logging it as an exception is misleading in the logs
// If we have shut ourselves down then calling Shutdown() here is redundant, but there is no issue calling
// it multiple times so better safe than sorry.
Shutdown();
}
catch (Exception e) when (FatalError.ReportAndCatch(e))
{
Expand Down