Fixed bug - update probe address if it changes between ticks

This commit is contained in:
jdl
2026-06-13 21:21:55 +02:00
parent 3fe9f63901
commit c45ac83eb0
2 changed files with 6 additions and 3 deletions

View File

@@ -42,10 +42,13 @@ func (a *App) onTick() {
}
case StateProbing:
// Promote probing peers to direct once alive (direct path confirmed
// working).
if time.Since(p.LastHandshakeTime()) < 2*wginterface.ProbeKeepalive {
// Promote probing peers to direct once alive (direct path confirmed
// working).
a.devPromote(p)
} else if ep := p.PreferredEndpoint(); ep.IsValid() && ep != p.WGEndpoint() {
// Update the probe address if it's changed.
a.devAddProbe(p, ep)
}
case StateDirect: