mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
try shortening http idle timeout for discord client
This commit is contained in:
parent
1776902000
commit
b0e1a7b9ff
1 changed files with 4 additions and 1 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue