aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Networking/Manager/NetworkManager.cs
diff options
context:
space:
mode:
authorShadowghost <Ghost_of_Stone@web.de>2023-07-02 12:34:50 +0200
committerShadowghost <Ghost_of_Stone@web.de>2023-07-02 12:40:49 +0200
commit9b0e44019a350ee89befcc92edcb95ae20787cf9 (patch)
tree46fd2046f3a504c8d62d24b115ed1efd9aec834f /Jellyfin.Networking/Manager/NetworkManager.cs
parenta6e9824e8a9febd90747535e1e4fe87e228257be (diff)
Apply review suggestions
Diffstat (limited to 'Jellyfin.Networking/Manager/NetworkManager.cs')
-rw-r--r--Jellyfin.Networking/Manager/NetworkManager.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/Jellyfin.Networking/Manager/NetworkManager.cs b/Jellyfin.Networking/Manager/NetworkManager.cs
index 1b1e91e9f..7d21c26cd 100644
--- a/Jellyfin.Networking/Manager/NetworkManager.cs
+++ b/Jellyfin.Networking/Manager/NetworkManager.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Linq;
using System.Net;
@@ -380,7 +381,7 @@ namespace Jellyfin.Networking.Manager
// Remove all interfaces matching any virtual machine interface prefix
if (config.IgnoreVirtualInterfaces)
{
- // Remove potentially exisiting * and split config string into prefixes
+ // Remove potentially existing * and split config string into prefixes
var virtualInterfacePrefixes = config.VirtualInterfaceNames
.Select(i => i.Replace("*", string.Empty, StringComparison.OrdinalIgnoreCase));
@@ -587,7 +588,7 @@ namespace Jellyfin.Networking.Manager
}
/// <inheritdoc/>
- public bool TryParseInterface(string intf, out IReadOnlyList<IPData> result)
+ public bool TryParseInterface(string intf, [NotNullWhen(true)] out IReadOnlyList<IPData>? result)
{
var resultList = new List<IPData>();
if (string.IsNullOrEmpty(intf) || _interfaces is null)
@@ -660,7 +661,7 @@ namespace Jellyfin.Networking.Manager
/// <inheritdoc/>
public IReadOnlyList<IPData> GetLoopbacks()
{
- if (!(IsIPv4Enabled && IsIPv4Enabled))
+ if (!IsIPv4Enabled && !IsIPv6Enabled)
{
return Array.Empty<IPData>();
}