From 3b3e779d44117c096c6e00b6b82cfcdc1f2317fd Mon Sep 17 00:00:00 2001 From: alyssa Date: Sun, 11 Jan 2026 22:53:38 +0000 Subject: [PATCH] try shortening http idle timeout for discord client --- Myriad/Rest/BaseRestClient.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Myriad/Rest/BaseRestClient.cs b/Myriad/Rest/BaseRestClient.cs index 9b11f30f..82390aa5 100644 --- a/Myriad/Rest/BaseRestClient.cs +++ b/Myriad/Rest/BaseRestClient.cs @@ -35,7 +35,10 @@ public class BaseRestClient: IAsyncDisposable if (!token.StartsWith("Bot ")) token = "Bot " + token; - Client = new HttpClient(); + Client = new HttpClient(new SocketsHttpHandler + { + PooledConnectionIdleTimeout = TimeSpan.FromSeconds(3), + }); Client.DefaultRequestHeaders.TryAddWithoutValidation("User-Agent", userAgent); Client.DefaultRequestHeaders.TryAddWithoutValidation("Authorization", token);