Project

General

Profile

Actions

Feature #17134

open

Add resolv_timeout to TCPSocket

Added by Glass_saga (Masaki Matsushita) over 1 year ago. Updated 12 months ago.

Status:
Open
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:99766]

Description

Add resolve_timeout to TCPSocket.new.
It makes DNS timeout customizable in the same way as Socket.tcp.

https://github.com/ruby/ruby/pull/3472


Files

resolv_timeout.patch (6.07 KB) resolv_timeout.patch Glass_saga (Masaki Matsushita), 08/29/2020 05:26 AM

Related issues

Related to Ruby master - Feature #16381: Accept resolv_timeout in Net::HTTPOpenActions
Related to Ruby master - Feature #17187: Add connect_timeout to TCPSocketClosedGlass_saga (Masaki Matsushita)Actions
Related to Ruby master - Bug #17220: Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829edClosedGlass_saga (Masaki Matsushita)Actions
Related to Ruby master - Feature #16476: Socket.getaddrinfo cannot be interrupted by Timeout.timeoutOpenGlass_saga (Masaki Matsushita)Actions
Actions #1

Updated by Glass_saga (Masaki Matsushita) over 1 year ago

Actions #2

Updated by Glass_saga (Masaki Matsushita) over 1 year ago

  • Subject changed from Add resolve_timeout to TCPSocket to Add resolv_timeout to TCPSocket

Updated by ko1 (Koichi Sasada) about 1 year ago

Could you describe API changes more?

Updated by Glass_saga (Masaki Matsushita) about 1 year ago

  • Target version changed from 36 to 3.0

It receives resolv_timeout as a keyword argument to specify name resolution timeout.

Example:

# it raises SocketError if name resolution is not finished within resolve_timeout.
tcp_socket = TCPSocket.new("example.com", 80, resolv_timeout: 10)
Actions #5

Updated by Glass_saga (Masaki Matsushita) about 1 year ago

  • Status changed from Open to Closed

Applied in changeset git|511fe23fa2bdf1f17faa91e0558be47b5bb62b2a.


Add resolve_timeout to TCPSocket [Feature #17134]

Actions #6

Updated by Glass_saga (Masaki Matsushita) about 1 year ago

Actions #7

Updated by naruse (Yui NARUSE) 12 months ago

  • Target version deleted (3.0)
  • Status changed from Closed to Open
Actions #8

Updated by naruse (Yui NARUSE) 12 months ago

  • Related to Bug #17220: Rails Active Job integration test fails with Ruby 3.0.0 since 2038cc6cab6ceeffef3ec3a765c70ae684f829ed added
Actions #9

Updated by naruse (Yui NARUSE) 11 months ago

  • Related to Feature #16476: Socket.getaddrinfo cannot be interrupted by Timeout.timeout added
Actions

Also available in: Atom PDF