From 32ae015c3b04dd5323bc8494f9044ae3446ec4ce Mon Sep 17 00:00:00 2001 From: barelyprofessional <150058423+barelyprofessional@users.noreply.github.com> Date: Thu, 5 Feb 2026 20:52:56 -0600 Subject: [PATCH] Reduce the absurd 100 second default timeout to 10 seconds for KiwiFlare --- KfChatDotNetBot/Services/KiwiFlare.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/KfChatDotNetBot/Services/KiwiFlare.cs b/KfChatDotNetBot/Services/KiwiFlare.cs index adcf723..4792c4f 100644 --- a/KfChatDotNetBot/Services/KiwiFlare.cs +++ b/KfChatDotNetBot/Services/KiwiFlare.cs @@ -32,6 +32,7 @@ public class KiwiFlare(string kfDomain, string? proxy = null, CancellationToken? public async Task GetChallenge() { using var client = new HttpClient(GetHttpClientHandler()); + client.Timeout = TimeSpan.FromSeconds(10); var response = await client.GetAsync($"https://{kfDomain}/", _ctx); var document = new HtmlDocument(); document.Load(await response.Content.ReadAsStreamAsync(_ctx)); @@ -122,6 +123,7 @@ public class KiwiFlare(string kfDomain, string? proxy = null, CancellationToken? public async Task SubmitAnswer(KiwiFlareChallengeSolutionModel solution) { using var client = new HttpClient(GetHttpClientHandler()); + client.Timeout = TimeSpan.FromSeconds(10); var formData = new FormUrlEncodedContent(new List> { new("a", solution.Salt), @@ -149,6 +151,7 @@ public class KiwiFlare(string kfDomain, string? proxy = null, CancellationToken? public async Task CheckAuth(string authToken) { using var client = new HttpClient(GetHttpClientHandler()); + client.Timeout = TimeSpan.FromSeconds(10); var formData = new FormUrlEncodedContent(new List> { new("f", authToken),