jeff icon indicating copy to clipboard operation
jeff copied to clipboard

Add configurable request timeout options

Open gogochikago opened this issue 3 years ago • 2 comments

I would like to be able to adjust the timeout time so that it can be dynamically changed if there is a large delay or host latency.

@hakanensari, check please

gogochikago avatar Dec 12 '21 20:12 gogochikago

@gogochikago good proposal. not sure that I agree with proposed implementation through, but before giving my comments on that... I wanted to ask.

If I remember correctly, you can set default timeouts for excon for yourself without modifying this gem. Like this:

Excon.default[:connect_timeout] = 5
Excon.default[:read_timeout] = 60

Have you tried that? Is there any reason why that doesn't work for you?

skatkov avatar Dec 13 '21 09:12 skatkov

To add to @skatkov's comment

Correct me if I'm wrong, but the defaults of Excon for both values seem to be 60 seconds. If so, overriding the default read_timeout would be redundant?

hakanensari avatar Dec 13 '21 14:12 hakanensari