diff --git a/peer/on_tick.go b/peer/on_tick.go index a9aedda..afdd5b6 100644 --- a/peer/on_tick.go +++ b/peer/on_tick.go @@ -36,12 +36,12 @@ func (a *App) onTick() { } case StateDirect: - // Demote stale non-public direct peers back to probing. - // Public nodes skip this: the non-public peer will re-initiate the - // handshake, and WireGuard will update the endpoint automatically. - if !p.IsPublic && !p.Up() && !a.isPublic { - a.devAddProbe(p, p.WGEndpoint()) + if p.IsPublic || a.isPublic || p.Up() { + break } + // Stale non-public direct peer: demote to probing so WireGuard + // resumes handshake attempts on the direct path. + a.devAddProbe(p, p.WGEndpoint()) } }