Repository navigation
Conversation
Move all shutdown related functions to cshutdn.c and give them `Curl_cshutdn_*` prefix. Add connection age handling methods to conncache.h, so that other code does not need to mess with details of how connections keep time.
There was a problem hiding this comment.
🟢 Approval recommended
The relocation and API updates are complete and preserve the existing shutdown and connection-timing behavior.
Pull request overview
Centralizes connection shutdown logic and encapsulates connection-age bookkeeping.
Changes:
- Moves shutdown APIs into
cshutdnwith consistent naming. - Adds connection timestamp helpers to the connection pool.
- Updates callers, including Telnet timeout handling.
File summaries
| File | Description |
|---|---|
lib/cshutdn.c |
Implements centralized shutdown operations. |
lib/cshutdn.h |
Declares the renamed shutdown APIs. |
lib/cfilters.c |
Uses centralized shutdown-state checks. |
lib/cfilters.h |
Removes the relocated shutdown declaration. |
lib/conncache.c |
Manages connection timestamps and shutdown calls. |
lib/conncache.h |
Exposes connection-age helper APIs. |
lib/connect.c |
Uses the new shutdown and usage APIs. |
lib/connect.h |
Removes relocated shutdown APIs. |
lib/telnet.c |
Uses the standard transfer timeout calculation. |
lib/transfer.c |
Uses centralized shutdown operations. |
lib/url.c |
Initializes timestamps through the connection pool. |
lib/vdns/hostip.c |
Uses the connection-age abstraction. |
lib/vtls/vtls.c |
Uses renamed shutdown timer APIs. |
Review details
- Files reviewed: 13/13 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
bagder
approved these changes
Sep 9, 2026
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.
Move all shutdown related functions to cshutdn.c and give them
Curl_cshutdn_*prefix.Add connection age handling methods to conncache.h, so that other code does not need to mess with details of how connections keep time.