Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More convenient timeout #444

Closed
kenn opened this issue Nov 24, 2017 · 2 comments · Fixed by #446
Closed

More convenient timeout #444

kenn opened this issue Nov 24, 2017 · 2 comments · Fixed by #446

Comments

@kenn
Copy link

kenn commented Nov 24, 2017

As much as I absolutely appreciate to have the flexibility of connect/write/read timeouts separately, sometimes it makes sense to have a simpler form:

HTTP.timeout(5).get

as a drop-in replacement for:

Timeout.timeout(5) { YourHttpTool.get }

which maintains parity with the original semantics, thus enable to migrate from other tools.

Is this something we're interested?

@ixti
Copy link
Member

ixti commented Nov 24, 2017

I was thinkign about this recently in fact. As we have shorthand syntax for :per_operation ( when you pass hash directly) I thought it will be reasonable to decide that timeout is :global when Integer is given.

@vincentwoo
Copy link

I agree, and was surprised to find that global did not work this way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants