mirror of
https://github.com/tailscale/tailscale.git
synced 2026-07-15 01:53:08 -04:00
AddReportHistoryForTest temporarily swapped out Client.TimeNow without holding any lock, racing with concurrent GetReport calls reading it from ReSTUN goroutines during tests. Instead, pass the current time to addReportHistoryAndSetPreferredDERP explicitly so the test helper never needs to touch the field. Fixes #20438 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com> Change-Id: I9c4f0a2f9427b5f1d3e8b06a49f0d2b71c3ee8a4