mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-10-07 00:05:02 -04:00
eden connections should only reset to idle once they are picked up
This commit is contained in:
parent
f442e81414
commit
bea2c4d5c6
@ -90,7 +90,7 @@ module HTTPX
|
||||
end
|
||||
|
||||
def match?(uri, options)
|
||||
return false if @state == :closing || @state == :closed
|
||||
return false if !used? && (@state == :closing || @state == :closed)
|
||||
|
||||
return false if exhausted?
|
||||
|
||||
|
@ -110,6 +110,7 @@ module HTTPX
|
||||
end
|
||||
|
||||
if conn
|
||||
conn.idling
|
||||
@connections << conn
|
||||
select_connection(conn)
|
||||
end
|
||||
@ -227,10 +228,7 @@ module HTTPX
|
||||
|
||||
def unregister_connection(connection)
|
||||
@connections.delete(connection)
|
||||
if connection.used? && !@eden_connections.include?(connection)
|
||||
@eden_connections << connection
|
||||
connection.idling
|
||||
end
|
||||
@eden_connections << connection if connection.used? && !@eden_connections.include?(connection)
|
||||
@connected_connections -= 1 if deselect_connection(connection)
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user