Repository navigation
connect timeout handling - #23558
Closed
icing wants to merge 1 commit into
Closed
connect timeout handling#23558icing wants to merge 1 commit into
icing wants to merge 1 commit into
Conversation
Replace the timestamps and bools from ae993d2 with a single timediff_t. We have only one connect attempt ongoing and do not need the duplication as with shutdowns. Preserve the connect timeout handling before a transfer reaches the DO phase, e.g. taking "protoconnect" phase into account.
bagder
approved these changes
Oct 22, 2026
There was a problem hiding this comment.
🟢 Approval recommended
The focused refactor preserves pre-DO timeout handling and consistently initializes, uses, and clears connection timing state, with no unresolved findings.
No open issues 🎉
What changed in this PR
This PR simplifies connection timeout tracking to one elapsed-time offset per connection while preserving timeout enforcement through protocol negotiation before the DO phase.
Changes:
- Replace per-socket timestamps and flags with a single
connect_start_msfield. - Centralize timeout handling for ongoing connections, including FTP data connections.
- Initialize and reset timing state during connection creation, successful connection, and filter cleanup.
| File | Description |
|---|---|
| lib/urldata.h | Replace per-socket timing state with one connection-start offset. |
| lib/url.c | Initialize the new timing field when allocating a connection. |
| lib/connect.c | Consolidate timeout calculations and reset timing after connection success. |
| lib/conncache.c | Reset timing when adding a connection to the pool. |
| lib/cfilters.c | Clear connection timing when discarding filters. |
Review effort: Balanced
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.
Replace the timestamps and bools from ae993d2 with a single timediff_t. We have only one connect attempt ongoing and do not need the duplication as with shutdowns.
Preserve the connect timeout handling before a transfer reaches the DO phase, e.g. taking "protoconnect" phase into account.