Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Steepfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ target :lib do

# Standard libraries used in the project
library(
'forwardable'
'forwardable',
'ipaddr'
)
end
2 changes: 1 addition & 1 deletion lib/appium_lib_core/driver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def resolve_addresses(host)
return [normalized_host] if ip_literal?(normalized_host)

Timeout.timeout(DNS_RESOLVE_TIMEOUT_SECONDS) do
Socket.getaddrinfo(normalized_host, nil).map { |entry| entry[3] }.uniq
Socket.getaddrinfo(normalized_host, nil).map { |entry| entry[3].to_s }.uniq
end
rescue Timeout::Error
::Appium::Logger.warn("DNS resolution for '#{host}' timed out after #{DNS_RESOLVE_TIMEOUT_SECONDS}s")
Expand Down
12 changes: 12 additions & 0 deletions sig/lib/appium_lib_core/driver.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,18 @@ module Appium

W3C_KEYS: Hash[String | Symbol, String]

DNS_RESOLVE_TIMEOUT_SECONDS: Integer

LOOPBACK_RANGES: Array[IPAddr]

LINK_LOCAL_RANGES: Array[IPAddr]

UNSPECIFIED_RANGES: Array[IPAddr]

MULTICAST_RANGES: Array[IPAddr]

DISALLOWED_RANGES: Array[IPAddr]

attr_reader protocol: String

attr_reader host: String
Expand Down
Loading