HttpClient Dns Changes #72514
-
I have been using this code to avoid dns issues. using var socketHandler = new SocketsHttpHandler
{
PooledConnectionIdleTimeout = TimeSpan.FromMinutes(1),
PooledConnectionLifetime = TimeSpan.FromMinutes(5),
};
using var httpClient = new HttpClient(socketHandler); But i am worried that using PooledConnectionLifetime will cancel download of large files. Is there anyway of avoiding dns issus without PooledConnectionLifetime? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
You can ultimately do the DNS yourself like #45144 (comment) . This is somehow overkill though. |
Beta Was this translation helpful? Give feedback.
-
It won't. This setting doesn't affect connections actively being used. It determines whether to get rid of idle connections that are too old. |
Beta Was this translation helpful? Give feedback.
It won't. This setting doesn't affect connections actively being used. It determines whether to get rid of idle connections that are too old.