dart-lang / http2

A HTTP/2 implementation for dart.

Home Page:https://pub.dev/packages/http2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DATA frames received before remote receives RST_STREAM incorrectly ignored

jrobindb opened this issue · comments

Per RFC 7540, 5.1 Stream States:

  Flow-controlled frames (i.e., DATA) received after sending
  RST_STREAM are counted toward the connection flow-control window.
  Even though these frames might be ignored, because they are sent
  before the sender receives the RST_STREAM, the sender will
  consider the frames to count against the flow-control window.

Our usage is:

  1. gRPC over HTTP/2, DATA frames about 4k-8k, ~30/second (video)
  2. Cancel (terminate) is invoked on the stream causing RST_STREAM to be sent
  3. Several DATA frames are sent by server before it receives RST_STREAM
  4. Server reduces connection window size for sent frames (cumulative)
  5. Connection window eventually reduced to 0, so no more data can be sent
  6. Dart client ignores frames, so window will never be increased; appears to hang
commented

Fixed with #122