cmd/stunstamp: increase probe jitter (#13362)

We've added more probe targets recently which has resulted in more
timeouts behind restrictive NATs in localized testing that don't
like how many flows we are creating at once. Not so much an issue
for datacenter or cloud-hosted deployments.

Updates tailscale/corp#22114

Signed-off-by: Jordan Whited <jordan@tailscale.com>
This commit is contained in:
Jordan Whited 2024-09-04 09:54:32 -07:00 committed by GitHub
parent 1dd1798bfa
commit 1fc4268aea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -380,7 +380,7 @@ func probe(meta nodeMeta, cf *connAndMeasureFn, dstPort int) (*time.Duration, er
Port: dstPort,
}
time.Sleep(rand.N(200 * time.Millisecond)) // jitter across tx
time.Sleep(rand.N(400 * time.Millisecond)) // jitter across tx
rtt, err := cf.fn(cf.conn, meta.hostname, netip.AddrPortFrom(meta.addr, uint16(dstPort)))
if err != nil {
if isTemporaryOrTimeoutErr(err) {