fix: filter out mirrors with failed curl connections in rank_mirrors()#185
Merged
exequtic merged 1 commit intoFeb 21, 2026
Merged
Conversation
rank_mirrors() only caught curl exit code 28 (timeout). Other failures like connection refused (7) or DNS errors (6) fell through with HTTP status 000, which passed the >= 400 check. These dead mirrors got fast time_total values and ranked first in the mirrorlist. - Check for any non-zero curl exit code, not just timeout - Only accept HTTP 200-299 responses instead of rejecting >= 400, which also filters out status 000 and unexpected redirects Fixes exequtic#184
3a51f5a to
a6b29fa
Compare
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.
Summary
000from broken mirrors that accept TCP but return no valid HTTP responseFixes #184
Test plan
?country=GB—mirror.marcusn.netis currently broken)/etc/pacman.d/mirrorlistTested against real mirrors: