Skip to content

Commit

Permalink
Merge pull request #45 from imxcstar/patch-1
Browse files Browse the repository at this point in the history
超时改到30分钟
  • Loading branch information
239573049 authored Dec 27, 2024
2 parents 4e605e3 + f1513e8 commit 494c8d3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Thor.Abstractions/HttpClientFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ public static HttpClient GetHttpClient(string key)
{
clients.Add(new HttpClient(new SocketsHttpHandler
{
PooledConnectionLifetime = TimeSpan.FromMinutes(10),
PooledConnectionIdleTimeout = TimeSpan.FromMinutes(10),
PooledConnectionLifetime = TimeSpan.FromMinutes(30),
PooledConnectionIdleTimeout = TimeSpan.FromMinutes(30),
EnableMultipleHttp2Connections = true,
ConnectTimeout = TimeSpan.FromMinutes(10),
KeepAlivePingTimeout = TimeSpan.FromMinutes(10),
ResponseDrainTimeout = TimeSpan.FromMinutes(10),
ConnectTimeout = TimeSpan.FromMinutes(30),
KeepAlivePingTimeout = TimeSpan.FromMinutes(30),
ResponseDrainTimeout = TimeSpan.FromMinutes(30),
})
{
Timeout = TimeSpan.FromMinutes(10),
Timeout = TimeSpan.FromMinutes(30),
DefaultRequestHeaders =
{
{ "User-Agent", "Thor" },
Expand All @@ -68,4 +68,4 @@ public static HttpClient GetHttpClient(string key)
return clients;
})).Value[new Random().Next(0, PoolSize)];
}
}
}

0 comments on commit 494c8d3

Please sign in to comment.