From a9face757a2a0b7530999f112def3b633dbdecf4 Mon Sep 17 00:00:00 2001 From: Ting-Yu Wang Date: Thu, 4 Mar 2021 10:52:00 -0800 Subject: Nit fix: Should use maxTimeout in backoffTimer The only user is in (*handshake).complete and it specifies MaxRTO, so there is no behavior changes. PiperOrigin-RevId: 360954447 --- pkg/tcpip/transport/tcp/connect.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/tcpip/transport') diff --git a/pkg/tcpip/transport/tcp/connect.go b/pkg/tcpip/transport/tcp/connect.go index d1e452421..61a173fbb 100644 --- a/pkg/tcpip/transport/tcp/connect.go +++ b/pkg/tcpip/transport/tcp/connect.go @@ -606,7 +606,7 @@ func newBackoffTimer(timeout, maxTimeout time.Duration, f func()) (*backoffTimer func (bt *backoffTimer) reset() tcpip.Error { bt.timeout *= 2 - if bt.timeout > MaxRTO { + if bt.timeout > bt.maxTimeout { return &tcpip.ErrTimeout{} } bt.t.Reset(bt.timeout) -- cgit v1.2.3