diff options
Diffstat (limited to 'pkg/tcpip/transport/tcp/cubic.go')
-rw-r--r-- | pkg/tcpip/transport/tcp/cubic.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/tcpip/transport/tcp/cubic.go b/pkg/tcpip/transport/tcp/cubic.go index cdb85598d..8cea416d2 100644 --- a/pkg/tcpip/transport/tcp/cubic.go +++ b/pkg/tcpip/transport/tcp/cubic.go @@ -129,7 +129,10 @@ func (c *cubicState) Update(packetsAcked int) { return } } else { - c.s.sndCwnd = c.getCwnd(packetsAcked, c.s.sndCwnd, c.s.srtt) + c.s.rtt.Lock() + srtt := c.s.rtt.srtt + c.s.rtt.Unlock() + c.s.sndCwnd = c.getCwnd(packetsAcked, c.s.sndCwnd, srtt) } } |