added out of network bitrate limit

This commit is contained in:
Luke Pulverenti
2015-04-09 01:20:23 -04:00
parent 6e6ce82cf6
commit b9c656e859
24 changed files with 136 additions and 73 deletions

View File

@@ -172,11 +172,11 @@ namespace MediaBrowser.Common.Implementations.Networking
Uri uri;
if (Uri.TryCreate(endpoint, UriKind.RelativeOrAbsolute, out uri))
{
var host = uri.DnsSafeHost;
Logger.Debug("Resolving host {0}", host);
try
{
var host = uri.DnsSafeHost;
Logger.Debug("Resolving host {0}", host);
address = GetIpAddresses(host).FirstOrDefault();
if (address != null)
@@ -186,9 +186,13 @@ namespace MediaBrowser.Common.Implementations.Networking
return IsInLocalNetworkInternal(address.ToString(), false);
}
}
catch (InvalidOperationException)
{
// Can happen with reverse proxy or IIS url rewriting
}
catch (Exception ex)
{
Logger.ErrorException("Error resovling hostname {0}", ex, host);
Logger.ErrorException("Error resovling hostname", ex);
}
}
}