mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-04 12:47:36 +03:00
send MAX_{STREAM}_DATA frames more frequently
WINDOW_UPDATEs are relatively small, and it doesn't cost much to grant the peer more flow control credit earlier.
This commit is contained in:
parent
9b4cdf66fc
commit
eb3e253be2
5 changed files with 46 additions and 36 deletions
|
@ -58,8 +58,9 @@ var _ = Describe("Connection Flow controller", func() {
|
|||
|
||||
It("autotunes the window", func() {
|
||||
controller.AddBytesRead(80)
|
||||
setRtt(20 * time.Millisecond)
|
||||
controller.lastWindowUpdateTime = time.Now().Add(-35 * time.Millisecond)
|
||||
rtt := 20 * time.Millisecond
|
||||
setRtt(rtt)
|
||||
controller.lastWindowUpdateTime = time.Now().Add(-4*protocol.WindowUpdateThreshold*rtt + time.Millisecond)
|
||||
offset := controller.GetWindowUpdate()
|
||||
Expect(offset).To(Equal(protocol.ByteCount(80 + 2*60)))
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue