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