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:
HoneyryderChuck 2025-03-31 11:46:04 +01:00
parent ca49c9ef41
commit ba60ef79a7

View File

@ -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