mirror of https://github.com/lidarr/Lidarr
update won't fail if service can't be stopped.
This commit is contained in:
parent
dabbd5f90e
commit
7701f87e82
|
@ -54,9 +54,17 @@ namespace NzbDrone.Update.Providers
|
||||||
&& _serviceProvider.IsServiceRunning(ServiceProvider.NZBDRONE_SERVICE_NAME))
|
&& _serviceProvider.IsServiceRunning(ServiceProvider.NZBDRONE_SERVICE_NAME))
|
||||||
{
|
{
|
||||||
appType = AppType.Service;
|
appType = AppType.Service;
|
||||||
_serviceProvider.Stop(ServiceProvider.NZBDRONE_SERVICE_NAME);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
_serviceProvider.Stop(ServiceProvider.NZBDRONE_SERVICE_NAME);
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (InvalidOperationException e)
|
||||||
|
{
|
||||||
|
logger.WarnException("couldn't stop service", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
appType = AppType.Normal;
|
appType = AppType.Normal;
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Microsoft.Owin.Hosting;
|
using Microsoft.Owin.Hosting;
|
||||||
using NLog;
|
using NLog;
|
||||||
using Nancy.Bootstrapper;
|
|
||||||
using Nancy.Owin;
|
|
||||||
using NzbDrone.Common;
|
using NzbDrone.Common;
|
||||||
using NzbDrone.Owin.MiddleWare;
|
using NzbDrone.Owin.MiddleWare;
|
||||||
using Owin;
|
using Owin;
|
||||||
|
|
Loading…
Reference in New Issue