|
|
@ -210,7 +210,7 @@ namespace NzbDrone.Core.Indexers
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (webException.Message.Contains("502") || webException.Message.Contains("503") ||
|
|
|
|
if (webException.Message.Contains("502") || webException.Message.Contains("503") ||
|
|
|
|
webException.Message.Contains("timed out"))
|
|
|
|
webException.Message.Contains("504") || webException.Message.Contains("timed out"))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_logger.Warn("{0} server is currently unavailable. {1} {2}", this, url, webException.Message);
|
|
|
|
_logger.Warn("{0} server is currently unavailable. {1} {2}", this, url, webException.Message);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -223,16 +223,10 @@ namespace NzbDrone.Core.Indexers
|
|
|
|
{
|
|
|
|
{
|
|
|
|
result.Queries.Add(new IndexerQueryResult { Response = ex.Response });
|
|
|
|
result.Queries.Add(new IndexerQueryResult { Response = ex.Response });
|
|
|
|
|
|
|
|
|
|
|
|
if (ex.RetryAfter != TimeSpan.Zero)
|
|
|
|
var retryTime = ex.RetryAfter != TimeSpan.Zero ? ex.RetryAfter : TimeSpan.FromHours(1);
|
|
|
|
{
|
|
|
|
|
|
|
|
_indexerStatusService.RecordFailure(Definition.Id, ex.RetryAfter);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
_indexerStatusService.RecordFailure(Definition.Id, TimeSpan.FromHours(1));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_logger.Warn("Request Limit reached for {0}", this);
|
|
|
|
_indexerStatusService.RecordFailure(Definition.Id, retryTime);
|
|
|
|
|
|
|
|
_logger.Warn("Request Limit reached for {0}. Disabled for {1}", this, retryTime);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (HttpException ex)
|
|
|
|
catch (HttpException ex)
|
|
|
|
{
|
|
|
|
{
|
|
|
|