Remove null check for logger in HttpsConnectionMiddleware (#16736)

This commit is contained in:
Kahbazi 2019-11-01 21:56:21 +03:30 committed by Stephen Halter
parent 271ebe0198
commit ab5b5a4ab5
1 changed files with 3 additions and 3 deletions

View File

@ -77,7 +77,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Https.Internal
}
_options = options;
_logger = loggerFactory?.CreateLogger<HttpsConnectionMiddleware>();
_logger = loggerFactory.CreateLogger<HttpsConnectionMiddleware>();
}
public async Task OnConnectionAsync(ConnectionContext context)
{
@ -201,13 +201,13 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Https.Internal
}
catch (OperationCanceledException)
{
_logger?.LogDebug(2, CoreStrings.AuthenticationTimedOut);
_logger.LogDebug(2, CoreStrings.AuthenticationTimedOut);
await sslStream.DisposeAsync();
return;
}
catch (IOException ex)
{
_logger?.LogDebug(1, ex, CoreStrings.AuthenticationFailed);
_logger.LogDebug(1, ex, CoreStrings.AuthenticationFailed);
await sslStream.DisposeAsync();
return;
}