thunder-client-support icon indicating copy to clipboard operation
thunder-client-support copied to clipboard

Lower connection timeout

Open faceair opened this issue 2 years ago • 3 comments

Please describe feature/problem details and solution you'd like.

image

When requesting an unreachable IP, Thunder does not fail fast.

Describe alternatives you've considered

You can set a smaller TCP connect timeout, such as 1 second. If a TCP connection cannot be established within 1 second, an error will be reported. The original HTTP request timeout can remain unchanged.

faceair avatar Apr 13 '23 01:04 faceair

Hi @faceair there is a Request Timeout setting, you can set a required value

rangav avatar Apr 13 '23 01:04 rangav

"Request Timeout" is the timeout set for an HTTP request. I prefer to set the "Connect Timeout" to avoid long waits when establishing a connection.

HTTP timeouts can generally be configured for a longer period of time, such as 30 seconds or more. However, when establishing a TCP connection under HTTP, it usually does not exceed 1 second (depending on the latency between the client and server).

In got, this configuration corresponds to: https://github.com/sindresorhus/got/blob/main/documentation/6-timeout.md#connect

faceair avatar Apr 13 '23 01:04 faceair

Thanks for clarification Will look into it

rangav avatar Apr 13 '23 05:04 rangav