From 129c95f12393e8b98bd7bb97a3148b9efbe56f96 Mon Sep 17 00:00:00 2001 From: glax Date: Wed, 4 Oct 2023 11:20:14 +0200 Subject: [PATCH] Set timeout on chromiumclient #62 --- Tranga/MangaConnectors/ChromiumDownloadClient.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Tranga/MangaConnectors/ChromiumDownloadClient.cs b/Tranga/MangaConnectors/ChromiumDownloadClient.cs index d71e97d..bccf2c7 100644 --- a/Tranga/MangaConnectors/ChromiumDownloadClient.cs +++ b/Tranga/MangaConnectors/ChromiumDownloadClient.cs @@ -48,7 +48,8 @@ internal class ChromiumDownloadClient : DownloadClient "--disable-gpu", "--disable-dev-shm-usage", "--disable-setuid-sandbox", - "--no-sandbox"} + "--no-sandbox"}, + Timeout = 10 }); } @@ -60,6 +61,7 @@ internal class ChromiumDownloadClient : DownloadClient protected override RequestResult MakeRequestInternal(string url, string? referrer = null) { IPage page = this.browser!.NewPageAsync().Result; + page.DefaultTimeout = 10000; IResponse response = page.GoToAsync(url, WaitUntilNavigation.DOMContentLoaded).Result; Log("Page loaded.");