remove unused version parameter from streams map constructor

This commit is contained in:
Marten Seemann 2022-12-24 12:51:41 +13:00
parent d972a5e8f2
commit d4a0793b6a
3 changed files with 1 additions and 5 deletions

View file

@ -530,7 +530,6 @@ func (s *connection) preSetup() {
uint64(s.config.MaxIncomingStreams), uint64(s.config.MaxIncomingStreams),
uint64(s.config.MaxIncomingUniStreams), uint64(s.config.MaxIncomingUniStreams),
s.perspective, s.perspective,
s.version,
) )
s.framer = newFramer(s.streamsMap, s.version) s.framer = newFramer(s.streamsMap, s.version)
s.receivedPackets = make(chan *receivedPacket, protocol.MaxConnUnprocessedPackets) s.receivedPackets = make(chan *receivedPacket, protocol.MaxConnUnprocessedPackets)

View file

@ -46,7 +46,6 @@ var errTooManyOpenStreams = errors.New("too many open streams")
type streamsMap struct { type streamsMap struct {
perspective protocol.Perspective perspective protocol.Perspective
version protocol.VersionNumber
maxIncomingBidiStreams uint64 maxIncomingBidiStreams uint64
maxIncomingUniStreams uint64 maxIncomingUniStreams uint64
@ -70,7 +69,6 @@ func newStreamsMap(
maxIncomingBidiStreams uint64, maxIncomingBidiStreams uint64,
maxIncomingUniStreams uint64, maxIncomingUniStreams uint64,
perspective protocol.Perspective, perspective protocol.Perspective,
version protocol.VersionNumber,
) streamManager { ) streamManager {
m := &streamsMap{ m := &streamsMap{
perspective: perspective, perspective: perspective,
@ -78,7 +76,6 @@ func newStreamsMap(
maxIncomingBidiStreams: maxIncomingBidiStreams, maxIncomingBidiStreams: maxIncomingBidiStreams,
maxIncomingUniStreams: maxIncomingUniStreams, maxIncomingUniStreams: maxIncomingUniStreams,
sender: sender, sender: sender,
version: version,
} }
m.initMaps() m.initMaps()
return m return m

View file

@ -88,7 +88,7 @@ var _ = Describe("Streams Map", func() {
BeforeEach(func() { BeforeEach(func() {
mockSender = NewMockStreamSender(mockCtrl) mockSender = NewMockStreamSender(mockCtrl)
m = newStreamsMap(mockSender, newFlowController, MaxBidiStreamNum, MaxUniStreamNum, perspective, protocol.VersionWhatever).(*streamsMap) m = newStreamsMap(mockSender, newFlowController, MaxBidiStreamNum, MaxUniStreamNum, perspective).(*streamsMap)
}) })
Context("opening", func() { Context("opening", func() {