mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-10-15 00:00:39 -04:00
fix for multi-hostname resolution with aliases failing
context of the multiple alias hops was cleaned up from the context, which broke next query access.
This commit is contained in:
parent
255fc98d44
commit
ee6c5b231f
@ -318,7 +318,7 @@ module HTTPX
|
||||
return
|
||||
end
|
||||
else
|
||||
@timeouts.delete(name)
|
||||
reset_hostname(name, connection: connection)
|
||||
@timeouts.delete(connection.origin.host)
|
||||
@connections.delete(connection)
|
||||
Resolver.cached_lookup_set(connection.origin.host, @family, addresses) if @resolver_options[:cache]
|
||||
@ -429,9 +429,8 @@ module HTTPX
|
||||
end
|
||||
end
|
||||
|
||||
def reset_hostname(hostname, reset_candidates: true)
|
||||
def reset_hostname(hostname, connection: @queries.delete(hostname), reset_candidates: true)
|
||||
@timeouts.delete(hostname)
|
||||
connection = @queries.delete(hostname)
|
||||
@timeouts.delete(hostname)
|
||||
|
||||
return unless connection && reset_candidates
|
||||
|
@ -63,7 +63,7 @@ module HTTPX
|
||||
|
||||
def handle_error: (NativeResolveError | StandardError) -> void
|
||||
|
||||
def reset_hostname: (String hostname, ?reset_candidates: bool) -> void
|
||||
def reset_hostname: (String hostname, ?connection: Connection, ?reset_candidates: bool) -> void
|
||||
end
|
||||
end
|
||||
end
|
Loading…
x
Reference in New Issue
Block a user