diff --git a/internal/handshake/params_negotiator_base.go b/internal/handshake/params_negotiator_base.go index 6766a984e..c2562e99f 100644 --- a/internal/handshake/params_negotiator_base.go +++ b/internal/handshake/params_negotiator_base.go @@ -51,7 +51,7 @@ func (h *paramsNegotiatorBase) init(params *TransportParameters) { h.idleTimeout = params.IdleTimeout // use this as a default value. As soon as the client sends its value, this gets updated - h.maxOutgoingStreams = protocol.MaxOutgoingStreams + h.maxOutgoingStreams = protocol.MaxIncomingStreams } // GetSendStreamFlowControlWindow gets the size of the stream-level flow control window for sending data @@ -74,10 +74,6 @@ func (h *paramsNegotiatorBase) GetMaxOutgoingStreams() uint32 { return h.maxOutgoingStreams } -func (h *paramsNegotiatorBase) setMaxOutgoingStreams(clientValue uint32) { - h.maxOutgoingStreams = utils.MinUint32(clientValue, protocol.MaxOutgoingStreams) -} - func (h *paramsNegotiatorBase) setRemoteIdleTimeout(t time.Duration) { h.remoteIdleTimeout = utils.MaxDuration(protocol.MinRemoteIdleTimeout, t) } diff --git a/internal/handshake/params_negotiator_gquic.go b/internal/handshake/params_negotiator_gquic.go index 1cf7c2087..ce41be941 100644 --- a/internal/handshake/params_negotiator_gquic.go +++ b/internal/handshake/params_negotiator_gquic.go @@ -47,7 +47,7 @@ func (h *paramsNegotiatorGQUIC) SetFromMap(params map[Tag][]byte) error { if err != nil { return errMalformedTag } - h.setMaxOutgoingStreams(clientValue) + h.maxOutgoingStreams = clientValue } if value, ok := params[TagICSL]; ok { clientValue, err := utils.LittleEndian.ReadUint32(bytes.NewBuffer(value)) diff --git a/internal/protocol/server_parameters.go b/internal/protocol/server_parameters.go index 2fd3b8504..697d78721 100644 --- a/internal/protocol/server_parameters.go +++ b/internal/protocol/server_parameters.go @@ -56,9 +56,6 @@ const DefaultMaxReceiveConnectionFlowControlWindowClient = 15 * (1 << 20) // 15 // This is the value that Chromium is using const ConnectionFlowControlMultiplier = 1.5 -// MaxOutgoingStreams is the maximum number of streams that we will open to a peer -const MaxOutgoingStreams = 100 - // MaxIncomingStreams is the maximum number of streams that a peer may open const MaxIncomingStreams = 100 @@ -70,7 +67,7 @@ const MaxStreamsMinimumIncrement = 10 // MaxNewStreamIDDelta is the maximum difference between and a newly opened Stream and the highest StreamID that a client has ever opened // note that the number of streams is half this value, since the client can only open streams with open StreamID -const MaxNewStreamIDDelta = 4 * MaxOutgoingStreams +const MaxNewStreamIDDelta = 4 * MaxIncomingStreams // MaxSessionUnprocessedPackets is the max number of packets stored in each session that are not yet processed. const MaxSessionUnprocessedPackets = DefaultMaxCongestionWindow