aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2016-08-07 02:39:42 -0400
committerGitHub <noreply@github.com>2016-08-07 02:39:42 -0400
commit82d4566c6d40e0ffd32a5afd41d256788a0ae379 (patch)
tree5c8c1f3c66acf073aaf1c6eb2984b3f6c7f9229a /MediaBrowser.Server.Implementations/Connect/ConnectManager.cs
parent1640bcb28904bccb0c31a00377a9399925cf327d (diff)
parente9bd472281aa2b3bba49f0b463469d22c89a0caa (diff)
Merge pull request #2032 from MediaBrowser/dev
Dev
Diffstat (limited to 'MediaBrowser.Server.Implementations/Connect/ConnectManager.cs')
-rw-r--r--MediaBrowser.Server.Implementations/Connect/ConnectManager.cs9
1 files changed, 4 insertions, 5 deletions
diff --git a/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs b/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs
index 4e913cf99..45cb2f57d 100644
--- a/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs
+++ b/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs
@@ -65,12 +65,11 @@ namespace MediaBrowser.Server.Implementations.Connect
if (!string.IsNullOrWhiteSpace(address))
{
- try
- {
- address = new Uri(address).Host;
- }
- catch
+ Uri newUri;
+
+ if (Uri.TryCreate(address, UriKind.Absolute, out newUri))
{
+ address = newUri.Host;
}
}