1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2024-12-24 08:44:46 +00:00

Fixed: Re-enabled monitoring provider.

This commit is contained in:
Keivan Beigi 2012-05-10 17:04:44 -07:00
parent 36378522e4
commit 057e248f8f
2 changed files with 7 additions and 12 deletions

View file

@ -7,14 +7,15 @@
#if DEBUG
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Runtime.InteropServices;
using EnvDTE;
using EnvDTE80;
using Process = EnvDTE.Process;
using Thread = System.Threading.Thread;
namespace NzbDrone
{
//[DebuggerStepThrough]
[DebuggerStepThrough]
public class ProcessAttacher
{
public static void Attach()

View file

@ -82,13 +82,7 @@ namespace NzbDrone.Providers
try
{
ICredentials identity = null;
if (_configFileProvider.AuthenticationType == AuthenticationType.Windows)
{
identity = CredentialCache.DefaultCredentials;
}
ICredentials identity = CredentialCache.DefaultCredentials;
_httpProvider.DownloadString(_iisProvider.AppUrl, identity); //This should preload the home page, making the first load faster.
string response = _httpProvider.DownloadString(_iisProvider.AppUrl + "/health", identity);
@ -107,11 +101,11 @@ namespace NzbDrone.Providers
catch (Exception ex)
{
_pingFailCounter++;
logger.ErrorException("Application pool is not responding. Count " + _pingFailCounter, ex);
if (_pingFailCounter > 4)
logger.Error("Application pool is not responding. Count " + _pingFailCounter + ex.Message);
if (_pingFailCounter > 10)
{
_pingFailCounter = 0;
//_iisProvider.RestartServer();
_iisProvider.RestartServer();
}
}
}