Open timmckenzie opened 9 years ago
On second though, we should be able to give the H2 client a priority tree. This could help it emulate how a browser would request resources. I suppose this would be a different bug.
Indeed, there are 2 bugs here, so let's split them out into 2 issues. We'll keep this one for the base issue of not respecting SETTINGS_MAX_CONCURRENT_STREAMS. I'll open another to send an event on RST_STREAM.
Reproduction
Result
I think that there should be two fixes.
First, node-http2 should respect the max stream setting. I am thinking some internal queue with pending requests. If the number of active streams is greater than MAX stream, push next requests to the pending queue. When stream finishes, pull next request off of queue.
Second, node-http2 should raise an error to the module's user if a stream is closed with anything except a except a normal stream completion. This would include RST_STEAM, various errors, and TCP errors.
I have a packet capture too if anyone is interested.
I will see if I have time to work on this issue.