forked from quic-go/quic-go
move the transport parameter stream limit check to the parser
This commit is contained in:
@@ -222,13 +222,9 @@ func (m *streamsMap) HandleMaxStreamsFrame(f *wire.MaxStreamsFrame) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *streamsMap) UpdateLimits(p *wire.TransportParameters) error {
|
||||
if p.MaxBidiStreamNum > protocol.MaxStreamCount || p.MaxUniStreamNum > protocol.MaxStreamCount {
|
||||
return qerr.StreamLimitError
|
||||
}
|
||||
func (m *streamsMap) UpdateLimits(p *wire.TransportParameters) {
|
||||
m.outgoingBidiStreams.SetMaxStream(p.MaxBidiStreamNum)
|
||||
m.outgoingUniStreams.SetMaxStream(p.MaxUniStreamNum)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *streamsMap) CloseWithError(err error) {
|
||||
|
||||
Reference in New Issue
Block a user