forked from quic-go/quic-go
change order of parameters in Stream constructor
This commit is contained in:
@@ -617,7 +617,7 @@ func (s *Session) newStreamImpl(id protocol.StreamID) (*stream, error) {
|
|||||||
if strExists {
|
if strExists {
|
||||||
return nil, fmt.Errorf("Session: stream with ID %d already exists", id)
|
return nil, fmt.Errorf("Session: stream with ID %d already exists", id)
|
||||||
}
|
}
|
||||||
stream, err := newStream(s.scheduleSending, s.flowControlManager, id)
|
stream, err := newStream(id, s.scheduleSending, s.flowControlManager)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ type stream struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// newStream creates a new Stream
|
// newStream creates a new Stream
|
||||||
func newStream(onData func(), flowControlManager flowcontrol.FlowControlManager, StreamID protocol.StreamID) (*stream, error) {
|
func newStream(StreamID protocol.StreamID, onData func(), flowControlManager flowcontrol.FlowControlManager) (*stream, error) {
|
||||||
s := &stream{
|
s := &stream{
|
||||||
onData: onData,
|
onData: onData,
|
||||||
streamID: StreamID,
|
streamID: StreamID,
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ var _ = Describe("Stream", func() {
|
|||||||
cpm := handshake.NewConnectionParamatersManager()
|
cpm := handshake.NewConnectionParamatersManager()
|
||||||
flowControlManager := flowcontrol.NewFlowControlManager(cpm)
|
flowControlManager := flowcontrol.NewFlowControlManager(cpm)
|
||||||
flowControlManager.NewStream(streamID, true)
|
flowControlManager.NewStream(streamID, true)
|
||||||
str, _ = newStream(onData, flowControlManager, streamID)
|
str, _ = newStream(streamID, onData, flowControlManager)
|
||||||
})
|
})
|
||||||
|
|
||||||
It("gets stream id", func() {
|
It("gets stream id", func() {
|
||||||
|
|||||||
Reference in New Issue
Block a user