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 <jonathan@tailscale.com>
This commit is contained in:
Jonathan Nobels 2024-07-02 14:22:13 -04:00 committed by GitHub
parent 012933635b
commit 4e5ef5b628
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -224,11 +224,12 @@ func newForwarder(logf logger.Logf, netMon *netmon.Monitor, linkSel ForwardLinkS
panic("nil netMon")
}
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())
return f