Project

General

Profile

Actions

Feature #14430

open

net/http: use Socket.tcp with connect_timeout, instead of TCPSocket.open wrapped in Timeout.timeout

Added by carl.hoerberg (Carl Hörberg) almost 7 years ago. Updated almost 4 years ago.

Status:
Open
Assignee:
-
Target version:
-
[ruby-core:85324]

Description

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


Related issues 1 (0 open1 closed)

Related to Ruby master - Feature #15553: Addrinfo.getaddrinfo supports timeoutClosedGlass_saga (Masaki Matsushita)Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0