mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-10-04 00:00:37 -04:00
if checking out a connection in a closing state, assume that the channel is irrecoverable and hard-close is beforehand
one less callback to manage, which potentially leaks across session usages
This commit is contained in:
parent
ca49c9ef41
commit
ba60ef79a7
@ -188,16 +188,9 @@ module HTTPX
|
||||
else
|
||||
pin_connection(connection, selector)
|
||||
end
|
||||
when :closed
|
||||
when :closing, :closed
|
||||
connection.idling
|
||||
select_connection(connection, selector)
|
||||
when :closing
|
||||
connection.once(:close) do
|
||||
next unless connection.current_session == self
|
||||
|
||||
connection.idling
|
||||
select_connection(connection, selector)
|
||||
end
|
||||
else
|
||||
pin_connection(connection, selector)
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user