forked from quic-go/quic-go
fix a typo
This commit is contained in:
@@ -40,8 +40,8 @@ const MaxStreamsPerConnection uint32 = 100
|
||||
// TODO: set a reasonable value here
|
||||
const MaxIdleConnectionStateLifetime = 60 * time.Second
|
||||
|
||||
// WindowUpdateNumRepitions is the number of times the same WindowUpdate frame will be sent to the client
|
||||
const WindowUpdateNumRepitions uint8 = 2
|
||||
// WindowUpdateNumRepetitions is the number of times the same WindowUpdate frame will be sent to the client
|
||||
const WindowUpdateNumRepetitions uint8 = 2
|
||||
|
||||
// MaxSessionUnprocessedPackets is the max number of packets stored in each session that are not yet processed.
|
||||
const MaxSessionUnprocessedPackets = 128
|
||||
|
||||
@@ -392,20 +392,20 @@ var _ = Describe("Session", func() {
|
||||
Expect(conn.written[0]).To(ContainSubstring(string([]byte{0x04, 0x05, 0, 0, 0})))
|
||||
})
|
||||
|
||||
It("repeats a WindowUpdate frame in WindowUpdateNumRepitions packets", func() {
|
||||
It("repeats a WindowUpdate frame in WindowUpdateNumRepetitions packets", func() {
|
||||
_, err := session.OpenStream(5)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
err = session.updateReceiveFlowControlWindow(5, 0xDECAFBAD)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
for i := uint8(0); i < protocol.WindowUpdateNumRepitions; i++ {
|
||||
for i := uint8(0); i < protocol.WindowUpdateNumRepetitions; i++ {
|
||||
err = session.sendPacket()
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
Expect(conn.written[i]).To(ContainSubstring(string([]byte{0x04, 0x05, 0, 0, 0})))
|
||||
}
|
||||
Expect(conn.written).To(HaveLen(int(protocol.WindowUpdateNumRepitions)))
|
||||
Expect(conn.written).To(HaveLen(int(protocol.WindowUpdateNumRepetitions)))
|
||||
err = session.sendPacket()
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
Expect(conn.written).To(HaveLen(int(protocol.WindowUpdateNumRepitions))) // no packet was sent
|
||||
Expect(conn.written).To(HaveLen(int(protocol.WindowUpdateNumRepetitions))) // no packet was sent
|
||||
})
|
||||
|
||||
It("sends public reset", func() {
|
||||
|
||||
@@ -50,7 +50,7 @@ func (m *windowUpdateManager) GetWindowUpdateFrames() []*frames.WindowUpdateFram
|
||||
var wuf []*frames.WindowUpdateFrame
|
||||
|
||||
for key, value := range m.streamOffsets {
|
||||
if value.Counter >= protocol.WindowUpdateNumRepitions {
|
||||
if value.Counter >= protocol.WindowUpdateNumRepetitions {
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
@@ -65,8 +65,8 @@ var _ = Describe("WindowUpdateManager", func() {
|
||||
Expect(wum.streamOffsets[9].Counter).To(Equal(uint8(1)))
|
||||
})
|
||||
|
||||
It("only sends out a window update frame WindowUpdateNumRepitions times", func() {
|
||||
for i := uint8(0); i < protocol.WindowUpdateNumRepitions; i++ {
|
||||
It("only sends out a window update frame WindowUpdateNumRepetitions times", func() {
|
||||
for i := uint8(0); i < protocol.WindowUpdateNumRepetitions; i++ {
|
||||
frames := wum.GetWindowUpdateFrames()
|
||||
Expect(frames).To(HaveLen(2))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user