From: carl.hoerberg@... Date: 2021-01-19T10:01:52+00:00 Subject: [ruby-core:102161] [Ruby master Feature#14430] net/http: use Socket.tcp with connect_timeout, instead of TCPSocket.open wrapped in Timeout.timeout Issue #14430 has been updated by carl.hoerberg (Carl H�rberg). The PR is updated, based on master and adds Net::HTTP#resolve_timeout, which delegates to Socket.tcp resolve_timeout, based on https://bugs.ruby-lang.org/issues/16381 but reraiseing Errno::ETIMEOUT as Net::OpenTimeout ---------------------------------------- Feature #14430: net/http: use Socket.tcp with connect_timeout, instead of TCPSocket.open wrapped in Timeout.timeout https://bugs.ruby-lang.org/issues/14430#change-90012 * Author: carl.hoerberg (Carl H�rberg) * Status: Open * Priority: Normal ---------------------------------------- Instead of using TCPSocket.open, wrapped in Timeout.timeout, that will create a temporary thread. By using Socket.tcp with the connect_timeout argument for open_timeout the connection opening is much more efficient as the kernels timeout is used instead. PR at: https://github.com/ruby/ruby/pull/1806 -- https://bugs.ruby-lang.org/ Unsubscribe: