CURL parameter --max-time
includes --connect-timeout
to separate the timeout of the handshake phase.
CURL - Timeouts · Everything curl
In addition, CURL can distinguish timeout errors at different stages: "connection timeout" and "operation timeout".
For example, CURL command with 5 second connection timeout and 25 second maximum timeout setting: