zilla
zilla copied to clipboard
Fix potential bug in active streams metric count
In half-duplex streams such as http
, when the response stream can be deferred until even after the request stream has ended, we may need to cancel the response stream before it begins, by sending a RESET
frame.
However, the metrics for active streams count this as a -1
for the response stream, even though it has not been offset by a corresponding +1
for the response BEGIN
.
To resolve, this we need to understand the state of the stream, i.e. that the BEGIN
was never sent.
This can be done by retaining per-stream state in the metrics counter for active streams, but better to expose the state of the stream in the frames sent by the bindings, so the metrics can be stateless.