mirror of
https://github.com/ruby/ruby.git
synced 2025-09-21 03:24:00 +02:00
merge revision(s) f88bff7705
:
[ruby/net-http] Revert "Replace Timeout.timeout in Net:HTTP#connect" This reverts commit753cae3bbc
.98caa38204
--- lib/net/http.rb | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-)
This commit is contained in:
parent
3f3aebc237
commit
2c1b1eae7c
2 changed files with 9 additions and 8 deletions
|
@ -994,13 +994,14 @@ module Net #:nodoc:
|
||||||
end
|
end
|
||||||
|
|
||||||
debug "opening connection to #{conn_addr}:#{conn_port}..."
|
debug "opening connection to #{conn_addr}:#{conn_port}..."
|
||||||
|
s = Timeout.timeout(@open_timeout, Net::OpenTimeout) {
|
||||||
begin
|
begin
|
||||||
s = Socket.tcp conn_addr, conn_port, @local_host, @local_port, connect_timeout: @open_timeout
|
TCPSocket.open(conn_addr, conn_port, @local_host, @local_port)
|
||||||
rescue => e
|
rescue => e
|
||||||
e = Net::OpenTimeout.new(e) if e.is_a?(Errno::ETIMEDOUT) #for compatibility with previous versions
|
|
||||||
raise e, "Failed to open TCP connection to " +
|
raise e, "Failed to open TCP connection to " +
|
||||||
"#{conn_addr}:#{conn_port} (#{e.message})"
|
"#{conn_addr}:#{conn_port} (#{e.message})"
|
||||||
end
|
end
|
||||||
|
}
|
||||||
s.setsockopt(Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1)
|
s.setsockopt(Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1)
|
||||||
debug "opened"
|
debug "opened"
|
||||||
if use_ssl?
|
if use_ssl?
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
# define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR
|
# define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR
|
||||||
#define RUBY_VERSION_TEENY 3
|
#define RUBY_VERSION_TEENY 3
|
||||||
#define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR
|
#define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR
|
||||||
#define RUBY_PATCHLEVEL 166
|
#define RUBY_PATCHLEVEL 167
|
||||||
|
|
||||||
#define RUBY_RELEASE_YEAR 2022
|
#define RUBY_RELEASE_YEAR 2022
|
||||||
#define RUBY_RELEASE_MONTH 10
|
#define RUBY_RELEASE_MONTH 10
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue