-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ArgumentOutOfRangeException is also thrown when setting HttpClient.Timeout to more than 24 days #10962
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Tagging subscribers to this area: @dotnet/ncl |
If you want "unlimited" timeout, you should use We'd gladly take a contribution to the docs to fix these. |
Btw. technical limitation for this is due to https://learn.microsoft.com/en-us/dotnet/api/system.threading.cancellationtokensource.cancelafter?view=net-9.0
|
Type of issue
Missing information
Description
From the source code, it actually throws when you put in value greater than about 24 days (
int.MaxValue
ms) too:I encountered this issue when trying to set it to
TimeSpan.MaxValue
:Page URL
https://learn.microsoft.com/en-us/dotnet/api/system.net.http.httpclient.timeout?view=net-9.0
Content source URL
https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System.Net.Http/HttpClient.xml
Document Version Independent Id
199a48e3-16ed-9fe0-8957-f14f37a17acd
Article author
@karelz
The text was updated successfully, but these errors were encountered: