From 0e0d53fa0092fa85694fb47ba4ee8e4749ca0ffa Mon Sep 17 00:00:00 2001 From: kaso17 Date: Tue, 3 Oct 2017 15:32:34 +0200 Subject: [PATCH] IWebClient: fix DelayRequest --- src/Jackett/Utils/Clients/IWebClient.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Jackett/Utils/Clients/IWebClient.cs b/src/Jackett/Utils/Clients/IWebClient.cs index 204365713..80fae708d 100644 --- a/src/Jackett/Utils/Clients/IWebClient.cs +++ b/src/Jackett/Utils/Clients/IWebClient.cs @@ -40,7 +40,7 @@ namespace Jackett.Utils.Clients configService = c; } - async protected void DelayRequest(WebRequest request) + async protected Task DelayRequest(WebRequest request) { if (request.EmulateBrowser == null) request.EmulateBrowser = EmulateBrowser; @@ -81,7 +81,7 @@ namespace Jackett.Utils.Clients { logger.Debug(string.Format("IWebClient.GetBytes(Url:{0})", request.Url)); PrepareRequest(request); - DelayRequest(request); + await DelayRequest(request); var result = await Run(request); result.Request = request; logger.Debug(string.Format("IWebClient: Returning {0} => {1} bytes", result.Status, (result.IsRedirect ? result.RedirectingTo + " " : "") + (result.Content == null ? "" : result.Content.Length.ToString()))); @@ -92,7 +92,7 @@ namespace Jackett.Utils.Clients { logger.Debug(string.Format("IWebClient.GetString(Url:{0})", request.Url)); PrepareRequest(request); - DelayRequest(request); + await DelayRequest(request); var result = await Run(request); result.Request = request; WebClientStringResult stringResult = Mapper.Map(result);