Repository navigation
Conversation
Without an explicit connect timeout the OS default applies, so an unreachable channel hangs for roughly two minutes on Linux and five on macOS. Bound it at 30 seconds. This covers only establishing the connection, so the existing five minute read timeout still covers slow transfers. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
reqwest_client_buildersets a read timeout but no connect timeout, so the OS decides how long an unreachable host takes to fail, and that differs per platform. #6416 measured 2m02s on Linux against 5m03s on macOS for the samepixi search -c https://10.1.1.1 polars.A connect timeout bounds establishing the connection, not the transfer, so it can be far shorter than the read timeout without hurting slow networks. 30 seconds is below the shortest platform default. I picked that number rather than finding it in the repo, so say if you want a different one.
Fixes #6416
How Has This Been Tested?
cargo test -p pixi_utils reqwestpasses 10 of 10. The added test asserts the connect timeout is non-zero and shorter than the read timeout, since a value at or above it would never fire first. No network test, because with a 30 second default it would cost 30 seconds of CI wall clock.AI Disclosure
Tools: Claude
Checklist: