Explorar el Código

Update Emby.Server.Implementations/Networking/NetworkManager.cs

Co-authored-by: Cody Robibero <cody@robibe.ro>
BaronGreenback hace 5 años
padre
commit
f983ea95d1
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      Emby.Server.Implementations/Networking/NetworkManager.cs

+ 2 - 2
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