mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-26 18:54:48 +03:00
Code Clean up: Convert to null-coalescing operator ?? (#5845)
Co-authored-by: Cody Robibero <cody@robibe.ro> Co-authored-by: Patrick Barron <18354464+barronpm@users.noreply.github.com>
This commit is contained in:
@@ -400,10 +400,7 @@ namespace MediaBrowser.Common.Net
|
||||
private bool ResolveHost()
|
||||
{
|
||||
// When was the last time we resolved?
|
||||
if (_lastResolved == null)
|
||||
{
|
||||
_lastResolved = DateTime.UtcNow;
|
||||
}
|
||||
_lastResolved ??= DateTime.UtcNow;
|
||||
|
||||
// If we haven't resolved before, or our timer has run out...
|
||||
if ((_addresses.Length == 0 && !Resolved) || (DateTime.UtcNow > _lastResolved.Value.AddMinutes(Timeout)))
|
||||
|
||||
Reference in New Issue
Block a user