Ver Fonte

net/dns: fix broken dns benchmark tests (#12686)

Updates tailscale/corp#20677

The recover function wasn't getting set in the benchmark
tests.  Default changed to an empty func.

Signed-off-by: Jonathan Nobels <[email protected]>
Jonathan Nobels há 1 ano atrás
pai
commit
4e5ef5b628
1 ficheiros alterados com 6 adições e 5 exclusões
  1. 6 5
      net/dns/resolver/forwarder.go

+ 6 - 5
net/dns/resolver/forwarder.go

@@ -224,11 +224,12 @@ func newForwarder(logf logger.Logf, netMon *netmon.Monitor, linkSel ForwardLinkS
 		panic("nil netMon")
 		panic("nil netMon")
 	}
 	}
 	f := &forwarder{
 	f := &forwarder{
-		logf:         logger.WithPrefix(logf, "forward: "),
-		netMon:       netMon,
-		linkSel:      linkSel,
-		dialer:       dialer,
-		controlKnobs: knobs,
+		logf:                    logger.WithPrefix(logf, "forward: "),
+		netMon:                  netMon,
+		linkSel:                 linkSel,
+		dialer:                  dialer,
+		controlKnobs:            knobs,
+		missingUpstreamRecovery: func() {},
 	}
 	}
 	f.ctx, f.ctxCancel = context.WithCancel(context.Background())
 	f.ctx, f.ctxCancel = context.WithCancel(context.Background())
 	return f
 	return f