]> git.ipfire.org Git - thirdparty/curl.git/commit
multi: introduce SETUP state for better timeouts
authorDaniel Stenberg <daniel@haxx.se>
Fri, 5 Apr 2024 11:07:16 +0000 (13:07 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 15 Apr 2024 21:42:06 +0000 (23:42 +0200)
commitbe659030ba078d6aa0b74a806da77dfb123159c6
treeceaa66c4a23548f02707bfdea149501b0dc0f7e8
parent6eb9e65781fa1fd8a0bcfe0715187a3a35f09ae4
multi: introduce SETUP state for better timeouts

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
Closes #13371
lib/multi.c
lib/multihandle.h
lib/urldata.h