fix StreamFrameQueue when deleting multiple streams with queued prio frames

This commit is contained in:
Marten Seemann
2016-06-10 20:14:52 +07:00
parent 1c1101de0e
commit c063fb1dd3
2 changed files with 13 additions and 0 deletions

View File

@@ -127,6 +127,9 @@ func (q *streamFrameQueue) RemoveStream(streamID protocol.StreamID) {
defer q.mutex.Unlock()
for i, frame := range q.prioFrames {
if frame == nil {
continue
}
if frame.StreamID == streamID {
q.byteLen -= frame.DataLen()
q.len--