remove closed streams from WindowUpdateManager

fixes #99
This commit is contained in:
Marten Seemann
2016-05-27 19:08:05 +07:00
parent d906492ae7
commit ffbd68770e
4 changed files with 31 additions and 0 deletions

View File

@@ -64,3 +64,11 @@ func (m *windowUpdateManager) GetWindowUpdateFrames() []*frames.WindowUpdateFram
return wuf
}
// RemoveStream should be called when a stream is closed for receiving
func (m *windowUpdateManager) RemoveStream(streamID protocol.StreamID) {
m.mutex.Lock()
defer m.mutex.Unlock()
delete(m.streamOffsets, streamID)
}