aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Networking
diff options
context:
space:
mode:
authorBond_009 <bond.009@outlook.com>2023-02-19 16:52:29 +0100
committerBond_009 <bond.009@outlook.com>2023-02-19 16:52:29 +0100
commit24a7e210c377bf828f21b5812f25c6545f7de006 (patch)
tree0476ae141a3bfc3d597d438a316f8c20bdfaa3c8 /Jellyfin.Networking
parent1deb9f36ba5822249b8359e311635ea9001d5635 (diff)
Optimize tryparse
* Don't check for null before * Don't try different formats when not needed (NumberFormat.Integer is the fast path)
Diffstat (limited to 'Jellyfin.Networking')
-rw-r--r--Jellyfin.Networking/Manager/NetworkManager.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Jellyfin.Networking/Manager/NetworkManager.cs b/Jellyfin.Networking/Manager/NetworkManager.cs
index 86989bfde..88332ce39 100644
--- a/Jellyfin.Networking/Manager/NetworkManager.cs
+++ b/Jellyfin.Networking/Manager/NetworkManager.cs
@@ -316,7 +316,7 @@ namespace Jellyfin.Networking.Manager
/// <inheritdoc/>
public string GetBindInterface(string source, out int? port)
{
- if (!string.IsNullOrEmpty(source) && IPHost.TryParse(source, out IPHost host))
+ if (IPHost.TryParse(source, out IPHost host))
{
return GetBindInterface(host, out port);
}