mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-30 05:25:35 +00:00
6e334e64a1
The netcheck package and the magicksock package coordinate via the health package, but both sides have time based heuristics through indirect dependencies. These were misaligned, so the implemented heuristic aimed at reducing DERP moves while there is active traffic were non-operational about 3/5ths of the time. It is problematic to setup a good test for this integration presently, so instead I added comment breadcrumbs along with the initial fix. Updates #8603 Signed-off-by: James Tucker <james@tailscale.com>
17 lines
358 B
Go
17 lines
358 B
Go
// Copyright (c) Tailscale Inc & AUTHORS
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
package magicsock
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"tailscale.com/net/netcheck"
|
|
)
|
|
|
|
func CheckDERPHeuristicTimes(t *testing.T) {
|
|
if netcheck.PreferredDERPFrameTime <= frameReceiveRecordRate {
|
|
t.Errorf("PreferredDERPFrameTime too low; should be at least frameReceiveRecordRate")
|
|
}
|
|
}
|