From d1a6c0ad3d4238618083774d2d92e5ca9fcd00a6 Mon Sep 17 00:00:00 2001 From: Glax Date: Thu, 18 Apr 2024 22:12:49 +0200 Subject: [PATCH] Set Chromium Start Timeout to 30 seconds. Resolves #135 ? --- Tranga/MangaConnectors/ChromiumDownloadClient.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Tranga/MangaConnectors/ChromiumDownloadClient.cs b/Tranga/MangaConnectors/ChromiumDownloadClient.cs index 5ae80ad..8ddf850 100644 --- a/Tranga/MangaConnectors/ChromiumDownloadClient.cs +++ b/Tranga/MangaConnectors/ChromiumDownloadClient.cs @@ -10,6 +10,7 @@ internal class ChromiumDownloadClient : DownloadClient { private IBrowser browser { get; set; } private const string ChromiumVersion = "1154303"; + private const int StartTimeoutMs = 30000; private async Task DownloadBrowser() { @@ -40,7 +41,7 @@ internal class ChromiumDownloadClient : DownloadClient await browserFetcher.DownloadAsync(ChromiumVersion); } - Log("Starting Browser."); + Log($"Starting Browser. ({StartTimeoutMs}ms timeout)"); return await Puppeteer.LaunchAsync(new LaunchOptions { Headless = true, @@ -50,7 +51,7 @@ internal class ChromiumDownloadClient : DownloadClient "--disable-dev-shm-usage", "--disable-setuid-sandbox", "--no-sandbox"}, - Timeout = 10000 + Timeout = StartTimeoutMs }); }