diff --git a/peer/on_hub_test.go b/peer/on_hub_test.go index 2523282..a14547d 100644 --- a/peer/on_hub_test.go +++ b/peer/on_hub_test.go @@ -268,7 +268,7 @@ func TestSwitchActiveRelay(t *testing.T) { name: "stale relay demoted to direct before backup elected", setup: func(t *testing.T, a *App) { old := addRelayPeer(t, a, "10.0.0.10", ep1) - old.wgPeer.LastHandshakeTime = time.Time{} // stale — triggers switch from onTick + old.LastPing = time.Time{} // stale — Up() checks LastPing; triggers switch — triggers switch from onTick a.relay = old addRelayPeer(t, a, "10.0.0.11", ep2) },