diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-05-07 15:07:51 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-05-07 15:07:51 -0400 |
| commit | f8263b8b69bac872f5b821e32f52fb502665976b (patch) | |
| tree | 58e4c567681202faafe70210bc7ee668c70fa150 /MediaBrowser.ServerApplication/ApplicationHost.cs | |
| parent | baa779fb3170fe155f479cf96d5ce013e2a6431c (diff) | |
improve restart code after port change
Diffstat (limited to 'MediaBrowser.ServerApplication/ApplicationHost.cs')
| -rw-r--r-- | MediaBrowser.ServerApplication/ApplicationHost.cs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/MediaBrowser.ServerApplication/ApplicationHost.cs b/MediaBrowser.ServerApplication/ApplicationHost.cs index 309a2c351..37e6d1b8d 100644 --- a/MediaBrowser.ServerApplication/ApplicationHost.cs +++ b/MediaBrowser.ServerApplication/ApplicationHost.cs @@ -432,6 +432,27 @@ namespace MediaBrowser.ServerApplication } /// <summary> + /// Called when [configuration updated]. + /// </summary> + /// <param name="sender">The sender.</param> + /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param> + protected override void OnConfigurationUpdated(object sender, EventArgs e) + { + base.OnConfigurationUpdated(sender, e); + + if (!string.Equals(HttpServer.UrlPrefix, ServerKernel.HttpServerUrlPrefix, StringComparison.OrdinalIgnoreCase)) + { + NotifyPendingRestart(); + } + + else if (!ServerManager.SupportsNativeWebSocket && ServerManager.WebSocketPortNumber != ServerConfigurationManager.Configuration.LegacyWebSocketPortNumber) + { + NotifyPendingRestart(); + } + + } + + /// <summary> /// Restarts this instance. /// </summary> public override void Restart() |
