From f983ea95d12f8924da4b5b0fdcc499e80d939da9 Mon Sep 17 00:00:00 2001 From: BaronGreenback Date: Mon, 20 Jul 2020 17:18:50 +0100 Subject: [PATCH] Update Emby.Server.Implementations/Networking/NetworkManager.cs Co-authored-by: Cody Robibero --- Emby.Server.Implementations/Networking/NetworkManager.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Emby.Server.Implementations/Networking/NetworkManager.cs b/Emby.Server.Implementations/Networking/NetworkManager.cs index 54d0e29ed..50cb44b28 100644 --- a/Emby.Server.Implementations/Networking/NetworkManager.cs +++ b/Emby.Server.Implementations/Networking/NetworkManager.cs @@ -152,12 +152,12 @@ namespace Emby.Server.Implementations.Networking return true; } - if (!IPAddress.TryParse(endpoint, out _)) + if (!IPAddress.TryParse(endpoint, out var ipAddress)) { return false; } - byte[] octet = IPAddress.Parse(endpoint).GetAddressBytes(); + byte[] octet = ipAddress.GetAddressBytes(); if ((octet[0] == 10) || (octet[0] == 172 && (octet[1] >= 16 && octet[1] <= 31)) || // RFC1918