mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-10-04 00:00:37 -04:00
fix: do not schedule deferred HEv2 ipv4 tcp handshake if the connection has already been closed by the sibling connection
This commit is contained in:
parent
5333def40d
commit
ed8fafd11d
@ -76,12 +76,16 @@ module HTTPX
|
||||
"resolver #{FAMILY_TYPES[RECORD_TYPES[family]]}: " \
|
||||
"answer #{FAMILY_TYPES[RECORD_TYPES[family]]} #{connection.peer.host}: #{addresses.inspect}"
|
||||
end
|
||||
|
||||
return if connection.state == :closed
|
||||
|
||||
if @current_selector && # if triggered by early resolve, session may not be here yet
|
||||
!connection.io &&
|
||||
connection.options.ip_families.size > 1 &&
|
||||
family == Socket::AF_INET &&
|
||||
addresses.first.to_s != connection.peer.host.to_s
|
||||
log { "resolver #{FAMILY_TYPES[RECORD_TYPES[family]]}: applying resolution delay..." }
|
||||
|
||||
@current_selector.after(0.05) do
|
||||
unless connection.state == :closed ||
|
||||
# double emission check
|
||||
|
Loading…
x
Reference in New Issue
Block a user