From a2b4ad839b4544261e36d5b799eb6045d496124a Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sat, 25 Jul 2020 23:17:09 +0000 Subject: [PATCH] net/netcheck: lower the hairpin check timeout to 100ms. This single check is the long pole for netcheck, and significantly slows down magicsock tests. Signed-off-by: David Anderson --- net/netcheck/netcheck.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/netcheck/netcheck.go b/net/netcheck/netcheck.go index 204d9889b..54d0fe197 100644 --- a/net/netcheck/netcheck.go +++ b/net/netcheck/netcheck.go @@ -55,7 +55,7 @@ const ( stunProbeTimeout = 3 * time.Second // hairpinCheckTimeout is the amount of time we wait for a // hairpinned packet to come back. - hairpinCheckTimeout = 500 * time.Millisecond + hairpinCheckTimeout = 100 * time.Millisecond // defaultActiveRetransmitTime is the retransmit interval we use // for STUN probes when we're in steady state (not in start-up), // but don't have previous latency information for a DERP