try shortening http idle timeout for discord client
Some checks failed
Build and push Docker image / .net docker build (push) Has been cancelled
.net checks / run .net tests (push) Has been cancelled
.net checks / dotnet-format (push) Has been cancelled

This commit is contained in:
alyssa 2026-01-11 22:53:38 +00:00
parent bd5b5c03fe
commit 78606f4a9f

View file

@ -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);