forked from quic-go/quic-go
send STREAMS_BLOCKED frame when MAX_STREAMS frame allows too few streams
This commit is contained in:
@@ -119,6 +119,8 @@ func (m *outgoingUniStreamsMap) openStream() sendStreamI {
|
||||
return s
|
||||
}
|
||||
|
||||
// maybeSendBlockedFrame queues a STREAMS_BLOCKED frame for the current stream offset,
|
||||
// if we haven't sent one for this offset yet
|
||||
func (m *outgoingUniStreamsMap) maybeSendBlockedFrame() {
|
||||
if m.blockedSent {
|
||||
return
|
||||
@@ -172,8 +174,10 @@ func (m *outgoingUniStreamsMap) SetMaxStream(num protocol.StreamNum) {
|
||||
}
|
||||
m.maxStream = num
|
||||
m.blockedSent = false
|
||||
if m.maxStream < m.nextStream-1+protocol.StreamNum(len(m.openQueue)) {
|
||||
m.maybeSendBlockedFrame()
|
||||
}
|
||||
m.unblockOpenSync()
|
||||
// TODO(#2826): it might be necessary to send a STREAMS_BLOCKED frame
|
||||
}
|
||||
|
||||
// unblockOpenSync unblocks the next OpenStreamSync go-routine to open a new stream
|
||||
|
||||
Reference in New Issue
Block a user