lib: always use Curl_1st_fatal instead of Curl_1st_err

Curl_1st_err() does not return the second error if the first result is
CURLE_AGAIN. This may cause errors to not become noticeable when they
should be.

Replace all use of Curl_1st_err() with Curl_1st_fatal(), which handles
CURLE_AGAIN as a not-a-real-error case.

Closes #20980
This commit is contained in:
Stefan Eissing 2026-03-18 11:37:18 +01:00 committed by Daniel Stenberg
parent 77c5470147
commit 41aaac61e2
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
7 changed files with 11 additions and 21 deletions

View file

@ -703,7 +703,7 @@ static CURLcode multi_done(struct Curl_easy *data,
}
/* Make sure that transfer client writes are really done now. */
result = Curl_1st_err(result, Curl_xfer_write_done(data, premature));
result = Curl_1st_fatal(result, Curl_xfer_write_done(data, premature));
/* Inform connection filters that this transfer is done */
Curl_conn_ev_data_done(data, premature);