mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-08-10 00:01:27 -04:00
close http2 connection as soon as it served all possible requests; this will make the persistent plugin account for resources better
This commit is contained in:
parent
4348f49c69
commit
745d95c7e0
@ -47,7 +47,7 @@ module HTTPX
|
||||
end
|
||||
|
||||
def send(request)
|
||||
if !@max_requests.positive?
|
||||
unless @max_requests.positive?
|
||||
@pending << request
|
||||
return
|
||||
end
|
||||
|
@ -202,6 +202,10 @@ module HTTPX
|
||||
|
||||
@streams.delete(request)
|
||||
send(@pending.shift) unless @pending.empty?
|
||||
return unless @streams.empty? && exhausted?
|
||||
|
||||
close
|
||||
emit(:close)
|
||||
end
|
||||
|
||||
def on_frame(bytes)
|
||||
|
Loading…
x
Reference in New Issue
Block a user