You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Timespan.MaxValue is calculated using long.MaxValue, while HttpClient uses int.MaxValue to define the HttpClient.Timeout value. This results in an exception when user tries to initialize a Timeout based on TimeSpan.MaxValue.
As HttpClient.TimeOut uses TimeSpan format, shouldn't it use the same scope of values ?
The text was updated successfully, but these errors were encountered:
pleilleur
changed the title
Calculation of field MaxTimeout of type TimeSpan in HttpClient doesn't match Timespan definition of MaxValue.
Calculation of field Timeout of type TimeSpan in HttpClient doesn't match Timespan definition of MaxValue.
Dec 12, 2023
https://github.com/microsoft/referencesource/blame/51cf7850defa8a17d815b4700b67116e3fa283c2/System/net/System/Net/Http/HttpClient.cs#L14
Timespan.MaxValue
is calculated usinglong.MaxValue
, whileHttpClient
usesint.MaxValue
to define theHttpClient.Timeout
value. This results in an exception when user tries to initialize a Timeout based onTimeSpan.MaxValue
.As
HttpClient.TimeOut
usesTimeSpan
format, shouldn't it use the same scope of values ?The text was updated successfully, but these errors were encountered: