My fault: "timeout" is operation-wide; when it's hit, the
operation ends as you reported. "network-timeout" is related to
connect(2) only. As far as I understand, by looking at the code,
there is no practical means, so far, to perform what you're asking
for. Either the connection cannot be established, and in this case
the code works as intended, or if it hangs for ever the operation
can only be aborted/timed out. In those cases, you definitely need
to fix the configuration by removing the hung URI.