[#97536] [Ruby master Bug#16694] JIT vs hardened GCC with PCH — v.ondruch@...
Issue #16694 has been reported by vo.x (Vit Ondruch).
11 messages
2020/03/18
[ruby-core:97362] [Ruby master Feature#16673] total_timeout for Net::HTTP
From:
mohamed.m.m.hafez@...
Date:
2020-03-05 00:16:59 UTC
List:
ruby-core #97362
Issue #16673 has been reported by mohamedhafez (Mohamed Hafez). ---------------------------------------- Feature #16673: total_timeout for Net::HTTP https://bugs.ruby-lang.org/issues/16673 * Author: mohamedhafez (Mohamed Hafez) * Status: Open * Priority: Normal ---------------------------------------- `Net::HTTP` allows setting `open_timeout` and `read_timeout`, but sometimes I just want to make sure an API call will finish within a set amount of time, and am not concerned with how long opening the connection takes and reading the connection takes individually, as long as the total is beneath a certain amount. Yes, one could set `open_timeout` + `read_timeout` to be equal to the maximum time they are willing to wait, but then for example if opening the socket happens almost immediately, I may get a read timeout when I am still willing to wait a bit longer (this is the case for the service I run, where we hit an external API that occasionally takes 60s to respond, and am trying to catch some of those longer running requests. it also occasionally takes over 5 seconds to open a connection, so I can't make open_timeout minimal either). In other languages, setting a total timeout is possible, like for example Java's `HttpRequest`. My intern @LevonAr is willing to work on this, and put in a `total_timeout` option in a way that doesn't interfere with the current functioning of open_timeout and read_timeout. Would a patch to put in this feature be accepted? -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>