mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-08-10 00:01:27 -04:00
connection emits the exhausted event when the strem limit has been achieved on an HTTP/2 connection
this happens when the requests are enqueued before the connection is negotiated, and then one has too many requests enqueued.
This commit is contained in:
parent
1ad91d898e
commit
a4c0096cd8
@ -292,6 +292,9 @@ module HTTPX
|
||||
parser.on(:promise) do |request, stream|
|
||||
request.emit(:promise, parser, stream)
|
||||
end
|
||||
parser.on(:exhausted) do
|
||||
emit(:exhausted)
|
||||
end
|
||||
parser.on(:origin) do |origin|
|
||||
@origins << origin
|
||||
end
|
||||
|
@ -56,6 +56,9 @@ module HTTPX
|
||||
end
|
||||
handle(request, stream)
|
||||
true
|
||||
rescue HTTP2Next::Error::StreamLimitExceeded
|
||||
@pending.unshift(request)
|
||||
emit(:exhausted)
|
||||
end
|
||||
|
||||
def consume
|
||||
|
Loading…
x
Reference in New Issue
Block a user