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

Define open_timeout and read_timeout independently #45

Open
ceritium opened this issue Feb 22, 2024 · 2 comments · May be fixed by #46
Open

Define open_timeout and read_timeout independently #45

ceritium opened this issue Feb 22, 2024 · 2 comments · May be fixed by #46

Comments

@ceritium
Copy link

Hi, is there any reason why we can't define open_timeout and read_timeout independently?

I would be happy to implement it; I think the following code would be enough:

    def open_timeout=(new_timeout)
      @http.open_timeout = new_timeout
    end

    def read_timeout=(new_timeout)
      @http.read_timeout = new_timeout
    end
@kou
Copy link
Member

kou commented Feb 22, 2024

Could you open a PR for this?

@ceritium
Copy link
Author

Sure, I wanted to make sure that my proposal makes sense.

ceritium added a commit to ceritium/xmlrpc that referenced this issue Feb 23, 2024
The current implementation uses the argument `timeout` to define both
open and read timeout; therefore, for a timeout of 30 seconds, the query
will have a total timeout of 60 seconds. Also, it's common to want to
define a lower open timeout but allow larger read timeouts.

Closes: ruby#45
@ceritium ceritium linked a pull request Feb 23, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants