Conversation
Take the number of attached transfers instead of the running ones as guidance how many connections the multi should cache. In addition, when guessing, only evict a connection if it has not been in use for a second or longer.
bagder
approved these changes
Aug 31, 2026
There was a problem hiding this comment.
🟡 Changes recommended
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Updates automatic connection-cache sizing to use attached transfers and delay eviction of recently used connections.
Changes:
- Sizes the inferred cache at twice the attached-transfer count.
- Requires guessed-cache eviction candidates to be idle for one second.
- Passes consistent timestamps through connection-limit checks.
File summaries
| File | Description |
|---|---|
lib/url.c |
Supplies connection creation time to limit checks. |
lib/multiif.h |
Declares attached-transfer counting API. |
lib/multi.c |
Implements transfer counting and type updates. |
lib/conncache.h |
Extends the limit-check interface. |
lib/conncache.c |
Revises inferred sizing and age-aware eviction. |
Review details
Suppressed comments (1)
lib/conncache.c:659
- The new comment is missing the subject “it” and ends the sentence with a comma.
/* We are guessing. So, only evict a "seemingly superfluous" connection
* when has not been used for this long, */
- Files reviewed: 5/5 changed files
- Comments generated: 2
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Take the number of attached transfers instead of the running ones as guidance how many connections the multi should cache.
In addition, when guessing, only evict a connection if it has not been in use for a second or longer.