|
|
@ -6,6 +6,7 @@ using Exceptioneer.WindowsFormsClient;
|
|
|
|
using NLog;
|
|
|
|
using NLog;
|
|
|
|
using Ninject;
|
|
|
|
using Ninject;
|
|
|
|
using NzbDrone.Common;
|
|
|
|
using NzbDrone.Common;
|
|
|
|
|
|
|
|
using NzbDrone.Common.Model;
|
|
|
|
|
|
|
|
|
|
|
|
namespace NzbDrone.Providers
|
|
|
|
namespace NzbDrone.Providers
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -16,17 +17,19 @@ namespace NzbDrone.Providers
|
|
|
|
private readonly IISProvider _iisProvider;
|
|
|
|
private readonly IISProvider _iisProvider;
|
|
|
|
private readonly ProcessProvider _processProvider;
|
|
|
|
private readonly ProcessProvider _processProvider;
|
|
|
|
private readonly WebClientProvider _webClientProvider;
|
|
|
|
private readonly WebClientProvider _webClientProvider;
|
|
|
|
|
|
|
|
private readonly ConfigFileProvider _configFileProvider;
|
|
|
|
|
|
|
|
|
|
|
|
private int _pingFailCounter;
|
|
|
|
private int _pingFailCounter;
|
|
|
|
private Timer _pingTimer;
|
|
|
|
private Timer _pingTimer;
|
|
|
|
|
|
|
|
|
|
|
|
[Inject]
|
|
|
|
[Inject]
|
|
|
|
public MonitoringProvider(ProcessProvider processProvider, IISProvider iisProvider,
|
|
|
|
public MonitoringProvider(ProcessProvider processProvider, IISProvider iisProvider,
|
|
|
|
WebClientProvider webClientProvider)
|
|
|
|
WebClientProvider webClientProvider, ConfigFileProvider configFileProvider)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_processProvider = processProvider;
|
|
|
|
_processProvider = processProvider;
|
|
|
|
_iisProvider = iisProvider;
|
|
|
|
_iisProvider = iisProvider;
|
|
|
|
_webClientProvider = webClientProvider;
|
|
|
|
_webClientProvider = webClientProvider;
|
|
|
|
|
|
|
|
_configFileProvider = configFileProvider;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public MonitoringProvider()
|
|
|
|
public MonitoringProvider()
|
|
|
@ -68,7 +71,7 @@ namespace NzbDrone.Providers
|
|
|
|
|
|
|
|
|
|
|
|
public virtual void PingServer(object sender, ElapsedEventArgs e)
|
|
|
|
public virtual void PingServer(object sender, ElapsedEventArgs e)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (!_iisProvider.ServerStarted) return;
|
|
|
|
if (!_iisProvider.ServerStarted || _configFileProvider.AuthenticationType == AuthenticationType.Windows) return;
|
|
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
|