lib/httpx/resolver/https.rb in httpx-0.21.1 vs lib/httpx/resolver/https.rb in httpx-0.22.0
- old
+ new
@@ -67,10 +67,11 @@
def resolver_connection
@resolver_connection ||= @pool.find_connection(@uri, @options) || begin
@building_connection = true
connection = @options.connection_class.new("ssl", @uri, @options.merge(ssl: { alpn_protocols: %w[h2] }))
@pool.init_connection(connection, @options)
- emit_addresses(connection, @family, @uri_addresses)
+ # only explicity emit addresses if connection didn't pre-resolve, i.e. it's not an IP.
+ emit_addresses(connection, @family, @uri_addresses) unless connection.addresses
@building_connection = false
connection
end
end