We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f19a744 commit bfb3386Copy full SHA for bfb3386
src/Components/Components/src/ComponentBase.cs
@@ -210,6 +210,9 @@ private async Task RunInitAndSetParametersAsync()
210
catch when (task.IsCanceled)
211
{
212
// Ignore exceptions from task cancelletions.
213
+ // Awaiting a canceled task may produce either an OperationCanceledException (if produced as a consequence of
214
+ // CancellationToken.ThrowIfCancellationRequested()) or a TaskCanceledException (produced as a consequence of awaiting Task.FromCanceled).
215
+ // It's much easier to check the state of the Task (i.e. Task.IsCanceled) rather than catch two distinct exceptions.
216
}
217
218
// Don't call StateHasChanged here. CallOnParametersSetAsync should handle that for us.
0 commit comments