Skip to content

Commit

Permalink
Use NullLogger instead of NullLoggerFactory (#59281)
Browse files Browse the repository at this point in the history
  • Loading branch information
WeihanLi authored Dec 6, 2024
1 parent 9f51190 commit b0b6d1d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public WebSocketsTransport(HttpConnectionOptions httpConnectionOptions, ILoggerF
bool useStatefulReconnect = false)
{
_useStatefulReconnect = useStatefulReconnect;
_logger = (loggerFactory ?? NullLoggerFactory.Instance).CreateLogger(typeof(WebSocketsTransport));
_logger = loggerFactory?.CreateLogger(typeof(WebSocketsTransport)) ?? NullLogger.Instance;
_httpConnectionOptions = httpConnectionOptions ?? new HttpConnectionOptions();

_closeTimeout = _httpConnectionOptions.CloseTimeout;
Expand Down

0 comments on commit b0b6d1d

Please sign in to comment.