Skip to content

Commit 4321cf1

Browse files
committed
Added comment in http2_server as well.
1 parent 8067971 commit 4321cf1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

transport/http2_server.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,13 @@ func (t *http2Server) handleData(f *http2.DataFrame) {
475475
return
476476
}
477477
// Decouple connection's flow control from application's read.
478+
// An update on connection's flow control should not depend on
479+
// whether user-applicaiton has read the data or not. Such a
480+
// restriction is already imposed on the stream's flow control,
481+
// and therefore the sender will be blocked anyways.
482+
// Decoupling the connection flow control will prevent other
483+
// active(fast) streams from starving in presence of slow or
484+
// inactive streams.
478485
if w := t.fc.onRead(uint32(size)); w > 0 {
479486
t.controlBuf.put(&windowUpdate{0, w})
480487
}

0 commit comments

Comments
 (0)