]> git.ipfire.org Git - thirdparty/curl.git/commit
tool_operate: don't discard failed parallel transfer result 6921/head
authorJay Satiro <raysatiro@yahoo.com>
Tue, 20 Apr 2021 05:51:56 +0000 (01:51 -0400)
committerJay Satiro <raysatiro@yahoo.com>
Tue, 20 Apr 2021 05:51:56 +0000 (01:51 -0400)
commit711879ca7cbda86c391c2b4dfb4b39847f773dc5
treeb8942fa6350c149c9dc846d30e26828840c0c3ea
parent6e3f2febcba4e744eb2f78db4905c76e73615c6c
tool_operate: don't discard failed parallel transfer result

- Save a parallel transfer's result code only when it fails and the
  transfer is not being retried.

Prior to this change the result code was always set which meant that a
failed result could be erroneously discarded if a different transfer
later had a successful result (CURLE_OK).

Before:

> curl --fail -Z https://httpbin.org/status/404 https://httpbin.org/delay/10
> echo %ERRORLEVEL%
0

After:

> curl --fail -Z https://httpbin.org/status/404 https://httpbin.org/delay/10
> echo %ERRORLEVEL%
22

Closes #xxxx
src/tool_operate.c