mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-10-04 00:00:37 -04:00
when addresses from the list expire, always assume that one of them is the current one, and point to the last element of the list (or none)
This commit is contained in:
parent
9a11846f11
commit
bbd4a59892
@ -66,9 +66,7 @@ module HTTPX
|
||||
|
||||
@addresses.delete_if(&:expired?)
|
||||
|
||||
unless (decr = prev_addr_size - @addresses.size).zero?
|
||||
@ip_index = @addresses.size - decr
|
||||
end
|
||||
@ip_index = @addresses.size - 1 if prev_addr_size != @addresses.size
|
||||
|
||||
@addresses.any?
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user