Kill NzbDrone process if service couldn't be stopped.

better Process/Service handling.
This commit is contained in:
Keivan Beigi 2013-07-05 11:51:38 -07:00
commit c1a75604fd
6 changed files with 71 additions and 46 deletions

View file

@ -33,12 +33,13 @@ namespace NzbDrone.Update.UpdateEngine
{
try
{
_logger.Info("NzbDrone Service is installed and running");
_serviceProvider.Stop(ServiceProvider.NZBDRONE_SERVICE_NAME);
}
catch (InvalidOperationException e)
catch (Exception e)
{
_logger.WarnException("couldn't stop service", e);
_logger.ErrorException("couldn't stop service", e);
}
}