Skip to content
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

Fix exception description for PooledConnectionLifetime #9716

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kevincathcart-cas
Copy link

Summary

This fixes the exception documentation for SocketsHttpHandler.PooledConnectionLifetime

The documentation currently reads:

Exceptions

ArgumentOutOfRangeException
The value specified is less than Zero or is equal to InfiniteTimeSpan.

However, the code is:

        public TimeSpan PooledConnectionIdleTimeout
        {
            get => _settings._pooledConnectionIdleTimeout;
            set
            {
                if (value < TimeSpan.Zero && value != Timeout.InfiniteTimeSpan)
                {
                    throw new ArgumentOutOfRangeException(nameof(value));
                }

                CheckDisposedOrStarted();
                _settings._pooledConnectionIdleTimeout = value;
            }
        }

So InfiniteTimeSpan is allowed, which makes sense given that it is documented as the default.

So updated to reflect the code, matching the verbiage from PooledConnectionIdleTimeout, which has a nearly identical implementation.

The only thing I have not verified is if the old message was valid for past versions, but it seems unlikely.

@kevincathcart-cas kevincathcart-cas requested a review from a team as a code owner March 13, 2024 21:53
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Mar 13, 2024
Copy link
Contributor

Tagging subscribers to this area: @dotnet/ncl

Copy link

Learn Build status updates of commit 2e409c1:

✅ Validation status: passed

File Status Preview URL Details
xml/System.Net.Http/SocketsHttpHandler.xml ✅Succeeded View

For more details, please refer to the build report.

For any questions, please:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.Net.Http community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant