aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Startup.Common/ApplicationHost.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2015-08-10 13:37:50 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2015-08-10 13:37:50 -0400
commit1936d6db43e10cc6f45fa72fde4b1628e06b8abd (patch)
treead1afffae72558c9f2d2be471d00bdd729325f1d /MediaBrowser.Server.Startup.Common/ApplicationHost.cs
parent3a309db3c53542be3b2d3854b077cfd125f1f435 (diff)
update search hints
Diffstat (limited to 'MediaBrowser.Server.Startup.Common/ApplicationHost.cs')
-rw-r--r--MediaBrowser.Server.Startup.Common/ApplicationHost.cs21
1 files changed, 15 insertions, 6 deletions
diff --git a/MediaBrowser.Server.Startup.Common/ApplicationHost.cs b/MediaBrowser.Server.Startup.Common/ApplicationHost.cs
index b554e0d1c..60ff36c6d 100644
--- a/MediaBrowser.Server.Startup.Common/ApplicationHost.cs
+++ b/MediaBrowser.Server.Startup.Common/ApplicationHost.cs
@@ -529,7 +529,7 @@ namespace MediaBrowser.Server.Startup.Common
var sharingRepo = new SharingRepository(LogManager, ApplicationPaths);
await sharingRepo.Initialize().ConfigureAwait(false);
RegisterSingleInstance<ISharingManager>(new SharingManager(sharingRepo, ServerConfigurationManager, LibraryManager, this));
-
+
RegisterSingleInstance<ISsdpHandler>(new SsdpHandler(LogManager.GetLogger("SsdpHandler"), ServerConfigurationManager, this));
var activityLogRepo = await GetActivityLogRepository().ConfigureAwait(false);
@@ -1088,15 +1088,24 @@ namespace MediaBrowser.Server.Startup.Common
{
get
{
- // Return the first matched address, if found, or the first known local address
- var address = LocalIpAddress;
+ try
+ {
+ // Return the first matched address, if found, or the first known local address
+ var address = LocalIpAddress;
- if (!string.IsNullOrWhiteSpace(address))
+ if (!string.IsNullOrWhiteSpace(address))
+ {
+ address = GetLocalApiUrl(address);
+ }
+
+ return address;
+ }
+ catch (Exception ex)
{
- address = GetLocalApiUrl(address);
+ Logger.ErrorException("Error getting local Ip address information", ex);
}
- return address;
+ return null;
}
}