mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-08-10 00:01:27 -04:00
fixing usage of active_stream_count, which changed in http-2-next, and never decrements; using local active stream count instead
This commit is contained in:
parent
ab67491a55
commit
e30469f8a3
@ -41,7 +41,7 @@ module HTTPX
|
||||
|
||||
def send(request, **)
|
||||
if !@handshake_completed ||
|
||||
@connection.active_stream_count >= @max_concurrent_requests
|
||||
@streams.size >= @max_concurrent_requests
|
||||
@pending << request
|
||||
return
|
||||
end
|
||||
@ -224,7 +224,7 @@ module HTTPX
|
||||
emit(:error, request, ex)
|
||||
end
|
||||
end
|
||||
return unless @connection.state == :closed && @connection.active_stream_count.zero?
|
||||
return unless @connection.state == :closed && @streams.size.zero?
|
||||
|
||||
emit(:close)
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user