Browse Source

Propage exceptions thrown during the embedded web server initialization

pull/2154/head
Kévin Chalet 2 years ago
parent
commit
07c95f8112
  1. 6
      src/OpenIddict.Client.SystemIntegration/OpenIddictClientSystemIntegrationHttpListener.cs

6
src/OpenIddict.Client.SystemIntegration/OpenIddictClientSystemIntegrationHttpListener.cs

@ -92,15 +92,15 @@ public sealed class OpenIddictClientSystemIntegrationHttpListener : BackgroundSe
}
// Ignore exceptions indicating that the host is shutting down and return immediately.
catch (OperationCanceledException) when (stoppingToken.IsCancellationRequested)
catch (OperationCanceledException exception) when (stoppingToken.IsCancellationRequested)
{
_source.SetResult(result: null);
_source.TrySetException(exception);
return;
}
catch (Exception exception) when (!OpenIddictHelpers.IsFatal(exception))
{
_source.SetResult(result: null);
_source.TrySetException(exception);
throw;
}

Loading…
Cancel
Save