aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Common/Net/IPHost.cs
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2023-02-20 11:09:54 +0100
committerGitHub <noreply@github.com>2023-02-20 11:09:54 +0100
commit720852f7087e32053407cd849470d3f13f57159c (patch)
treea3c8d8aff92aeb5f107b724513a3ed775d71b3be /MediaBrowser.Common/Net/IPHost.cs
parent69379d80a1f3352972a80b06815038ee853622eb (diff)
parentb119c6d868c24212300285c501f43af91b31d404 (diff)
Merge pull request #9356 from Bond-009/tryparse
Diffstat (limited to 'MediaBrowser.Common/Net/IPHost.cs')
-rw-r--r--MediaBrowser.Common/Net/IPHost.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/MediaBrowser.Common/Net/IPHost.cs b/MediaBrowser.Common/Net/IPHost.cs
index 7cf1b8aa0..ec76a43b6 100644
--- a/MediaBrowser.Common/Net/IPHost.cs
+++ b/MediaBrowser.Common/Net/IPHost.cs
@@ -190,7 +190,7 @@ namespace MediaBrowser.Common.Net
/// <returns>Object representing the string, if it has successfully been parsed.</returns>
public static IPHost Parse(string host)
{
- if (!string.IsNullOrEmpty(host) && IPHost.TryParse(host, out IPHost res))
+ if (IPHost.TryParse(host, out IPHost res))
{
return res;
}
@@ -206,7 +206,7 @@ namespace MediaBrowser.Common.Net
/// <returns>Object representing the string, if it has successfully been parsed.</returns>
public static IPHost Parse(string host, AddressFamily family)
{
- if (!string.IsNullOrEmpty(host) && IPHost.TryParse(host, out IPHost res))
+ if (IPHost.TryParse(host, out IPHost res))
{
if (family == AddressFamily.InterNetwork)
{