Check service running before checking self restart

pull/702/head
hatharry 8 years ago
parent cabf2cdc1b
commit 71386f0ceb

@ -45,7 +45,11 @@ namespace MediaBrowser.ServerApplication
{
var options = new StartupOptions();
_isRunningAsService = options.ContainsOption("-service");
_canRestartService = CanRestartWindowsService();
if (_isRunningAsService)
{
_canRestartService = CanRestartWindowsService();
}
var currentProcess = Process.GetCurrentProcess();

Loading…
Cancel
Save