Skip to content

multi: introduce SETUP state for better timeouts - #13371

Closed
bagder wants to merge 2 commits into
masterfrom
bagder/waitpipe-timeouts
Closed

multi: introduce SETUP state for better timeouts#13371
bagder wants to merge 2 commits into
masterfrom
bagder/waitpipe-timeouts

Conversation

@bagder

@bagder bagder commented Apr 15, 2024

Copy link
Copy Markdown
Member

Since we can go to the CONNECT state from PENDING, potentially multiple times for a single transfer, this change introdues a SETUP state that happens before CONNECT when doing a new transfer.

Now, doing a redirect on a handle goes back to SETUP (not CONNECT like before) and we initilize the connect timeout etc in SETUP. Previously, we would do it in CONNECT but that would make it unreliable in cases where a transfer goes in and out between CONNECT and PENDING multiple times.

SETUP is transient, so the handle never actually stays in that state.

Additionally: take care of timeouts of PENDING transfers in curl_multi_perform()

Ref: #13227

bagder added 2 commits April 15, 2024 11:32
Since we can go to the CONNECT state from PENDING, potentially multiple
times for a single transfer, this change introdues a SETUP state that
happens before CONNECT when doing a new transfer.

Now, doing a redirect on a handle goes back to SETUP (not CONNECT like
before) and we initilize the connect timeout etc in SETUP. Previously,
we would do it in CONNECT but that would make it unreliable in cases
where a transfer goes in and out between CONNECT and PENDING multiple
times.

SETUP is transient, so the handle never actually stays in that state.

Additionally: take care of timeouts of PENDING transfers in
curl_multi_perform()

Ref: #13227
@bagder bagder closed this in be65903 Apr 15, 2024
@bagder
bagder deleted the bagder/waitpipe-timeouts branch April 15, 2024 21:42
bagder added a commit that referenced this pull request Oct 2, 2024
For all states before MSTATE_DO the connect timeout needs to be
considered.

Regression since #13371 (be65903) shipped in 8.8.0

Reported-by: Deniz Sökmen
Fixes #15100
bagder added a commit that referenced this pull request Oct 2, 2024
For all states before MSTATE_DO the connect timeout needs to be
considered.

Regression since #13371 (be65903) shipped in 8.8.0

Reported-by: Deniz Sökmen
Fixes #15100
Closes #15119
pps83 pushed a commit to pps83/curl that referenced this pull request Apr 26, 2025
For all states before MSTATE_DO the connect timeout needs to be
considered.

Regression since curl#13371 (be65903) shipped in 8.8.0

Reported-by: Deniz Sökmen
Fixes curl#15100
Closes curl#15119
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant