remove unused version parameter from receive stream constructor

This commit is contained in:
Marten Seemann 2022-12-24 12:49:05 +13:00
parent 1646fd545e
commit 0f352f2653
4 changed files with 3 additions and 6 deletions

View file

@ -51,7 +51,6 @@ type receiveStream struct {
deadline time.Time
flowController flowcontrol.StreamFlowController
version protocol.VersionNumber
}
var (
@ -63,7 +62,6 @@ func newReceiveStream(
streamID protocol.StreamID,
sender streamSender,
flowController flowcontrol.StreamFlowController,
version protocol.VersionNumber,
) *receiveStream {
return &receiveStream{
streamID: streamID,
@ -73,7 +71,6 @@ func newReceiveStream(
readChan: make(chan struct{}, 1),
readOnce: make(chan struct{}, 1),
finalOffset: protocol.MaxByteCount,
version: version,
}
}

View file

@ -31,7 +31,7 @@ var _ = Describe("Receive Stream", func() {
BeforeEach(func() {
mockSender = NewMockStreamSender(mockCtrl)
mockFC = mocks.NewMockStreamFlowController(mockCtrl)
str = newReceiveStream(streamID, mockSender, mockFC, protocol.VersionWhatever)
str = newReceiveStream(streamID, mockSender, mockFC)
timeout := scaleDuration(250 * time.Millisecond)
strWithTimeout = gbytes.TimeoutReader(str, timeout)

View file

@ -112,7 +112,7 @@ func newStream(streamID protocol.StreamID,
s.completedMutex.Unlock()
},
}
s.receiveStream = *newReceiveStream(streamID, senderForReceiveStream, flowController, version)
s.receiveStream = *newReceiveStream(streamID, senderForReceiveStream, flowController)
return s
}

View file

@ -114,7 +114,7 @@ func (m *streamsMap) initMaps() {
protocol.StreamTypeUni,
func(num protocol.StreamNum) receiveStreamI {
id := num.StreamID(protocol.StreamTypeUni, m.perspective.Opposite())
return newReceiveStream(id, m.sender, m.newFlowController(id), m.version)
return newReceiveStream(id, m.sender, m.newFlowController(id))
},
m.maxIncomingUniStreams,
m.sender.queueControlFrame,