mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-22 08:45:23 +03:00
Optimize tryparse
* Don't check for null before * Don't try different formats when not needed (NumberFormat.Integer is the fast path)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user