From 8a891d07cfb0daab8a2d3e476c4906eeedd7ce64 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Sat, 17 Jun 2023 14:22:35 +0300 Subject: [PATCH] Test eligibility of the first request in AvistazBase --- .../Indexers/Definitions/Avistaz/AvistazBase.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/NzbDrone.Core/Indexers/Definitions/Avistaz/AvistazBase.cs b/src/NzbDrone.Core/Indexers/Definitions/Avistaz/AvistazBase.cs index 9a4fed9ad..0074f9c5b 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/Avistaz/AvistazBase.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/Avistaz/AvistazBase.cs @@ -93,12 +93,10 @@ namespace NzbDrone.Core.Indexers.Definitions.Avistaz var jsonResponse = new HttpResponse(ex.Response); return new ValidationFailure(string.Empty, jsonResponse.Resource?.Message ?? "Unauthorized request to indexer"); } - else - { - _logger.Warn(ex, "Unable to connect to indexer"); - return new ValidationFailure(string.Empty, "Unable to connect to indexer, check the log above the ValidationFailure for more details. " + ex.Message); - } + _logger.Warn(ex, "Unable to connect to indexer"); + + return new ValidationFailure(string.Empty, "Unable to connect to indexer, check the log above the ValidationFailure for more details. " + ex.Message); } catch (Exception ex) { @@ -107,7 +105,7 @@ namespace NzbDrone.Core.Indexers.Definitions.Avistaz return new ValidationFailure(string.Empty, "Unable to connect to indexer, check the log above the ValidationFailure for more details"); } - return null; + return await base.TestConnection(); } private async Task GetToken()