diff --git a/wgengine/magicsock/magicsock.go b/wgengine/magicsock/magicsock.go index ff3d02336..9e1bcd059 100644 --- a/wgengine/magicsock/magicsock.go +++ b/wgengine/magicsock/magicsock.go @@ -3027,18 +3027,9 @@ func getPeerMTUsProbedMetric(mtu tstun.WireMTU) *clientmetric.Metric { return mm } -// GetLastNetcheckReport returns the last netcheck report, running a new one if a recent one does not exist. +// GetLastNetcheckReport returns the last netcheck report, returning nil if a recent one does not exist. func (c *Conn) GetLastNetcheckReport(ctx context.Context) *netcheck.Report { - lastReport := c.lastNetCheckReport.Load() - if lastReport == nil { - nr, err := c.updateNetInfo(ctx) - if err != nil { - c.logf("magicsock.Conn.GetLastNetcheckReport: updateNetInfo: %v", err) - return nil - } - return nr - } - return lastReport + return c.lastNetCheckReport.Load() } // SetLastNetcheckReportForTest sets the magicsock conn's last netcheck report.