trigger sending when stream data is read

fixes #223
This commit is contained in:
Lucas Clemente
2016-07-28 16:52:04 +02:00
parent 3a88a8cffa
commit 3d0ed0d1f9
2 changed files with 12 additions and 0 deletions

View File

@@ -118,6 +118,7 @@ func (s *stream) Read(p []byte) (int, error) {
s.readOffset += protocol.ByteCount(m)
s.flowControlManager.AddBytesRead(s.streamID, protocol.ByteCount(m))
s.onData() // so that a possible WINDOW_UPDATE is sent
if s.readPosInFrame >= int(frame.DataLen()) {
fin := frame.FinBit