mirror of
https://github.com/Jackett/Jackett
synced 2025-01-18 21:50:33 +00:00
IWebClient: fix DelayRequest
This commit is contained in:
parent
034edbd32a
commit
0e0d53fa00
1 changed files with 3 additions and 3 deletions
|
@ -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 ? "<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<WebClientStringResult>(result);
|
||||
|
|
Loading…
Reference in a new issue