Fixed: (ExecuteAuth) Request timeout of 15s by default, if not set otherwise

This commit is contained in:
Bogdan
2023-02-03 15:58:17 +02:00
parent 529fbfd9bd
commit dbf86efb0a
23 changed files with 187 additions and 360 deletions

View File

@@ -404,6 +404,11 @@ namespace NzbDrone.Core.Indexers
{
request.Encoding = Encoding;
if (request.RequestTimeout == TimeSpan.Zero)
{
request.RequestTimeout = TimeSpan.FromSeconds(15);
}
var response = await _httpClient.ExecuteProxiedAsync(request, Definition);
_eventAggregator.PublishEvent(new IndexerAuthEvent(Definition.Id, !response.HasHttpError, response.ElapsedTime));