mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-08-10 00:01:27 -04:00
bugfix: do not blindly sum origins when merging connections
so that there are no repeated entries. Fixes #125
This commit is contained in:
parent
f0e189f5be
commit
3eddfdb509
@ -129,7 +129,7 @@ module HTTPX
|
||||
end
|
||||
|
||||
def merge(connection)
|
||||
@origins += connection.instance_variable_get(:@origins)
|
||||
@origins |= connection.instance_variable_get(:@origins)
|
||||
connection.purge_pending do |req|
|
||||
send(req)
|
||||
end
|
||||
@ -413,7 +413,7 @@ module HTTPX
|
||||
emit(:exhausted)
|
||||
end
|
||||
parser.on(:origin) do |origin|
|
||||
@origins << origin
|
||||
@origins |= [origin]
|
||||
end
|
||||
parser.on(:close) do |force|
|
||||
transition(:closing)
|
||||
|
Loading…
x
Reference in New Issue
Block a user