From a205f3acef24e6ce2283b8db9e9f88e58f6eb6ad Mon Sep 17 00:00:00 2001 From: jdl Date: Wed, 10 Jun 2026 06:21:31 +0200 Subject: [PATCH] Cleanup --- peer/on_tick.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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()) } }