From 886033be2483c4dcc942ad995ec958a1e9b5d148 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 10 Feb 2015 23:05:58 -0500 Subject: [PATCH] resolve loop when updating local ports --- MediaBrowser.Server.Startup.Common/ApplicationHost.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/MediaBrowser.Server.Startup.Common/ApplicationHost.cs b/MediaBrowser.Server.Startup.Common/ApplicationHost.cs index c3f995525..e656d6837 100644 --- a/MediaBrowser.Server.Startup.Common/ApplicationHost.cs +++ b/MediaBrowser.Server.Startup.Common/ApplicationHost.cs @@ -843,10 +843,13 @@ namespace MediaBrowser.Server.Startup.Common if (ServerConfigurationManager.Configuration.HttpServerPortNumber != HttpPort || ServerConfigurationManager.Configuration.HttpsPortNumber != HttpsPort) { - ServerConfigurationManager.Configuration.IsPortAuthorized = false; - ServerConfigurationManager.SaveConfiguration(); + if (ServerConfigurationManager.Configuration.IsPortAuthorized) + { + ServerConfigurationManager.Configuration.IsPortAuthorized = false; + ServerConfigurationManager.SaveConfiguration(); - requiresRestart = true; + requiresRestart = true; + } } }