Cleanup
This commit is contained in:
@@ -36,12 +36,12 @@ func (a *App) onTick() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
case StateDirect:
|
case StateDirect:
|
||||||
// Demote stale non-public direct peers back to probing.
|
if p.IsPublic || a.isPublic || p.Up() {
|
||||||
// Public nodes skip this: the non-public peer will re-initiate the
|
break
|
||||||
// handshake, and WireGuard will update the endpoint automatically.
|
|
||||||
if !p.IsPublic && !p.Up() && !a.isPublic {
|
|
||||||
a.devAddProbe(p, p.WGEndpoint())
|
|
||||||
}
|
}
|
||||||
|
// Stale non-public direct peer: demote to probing so WireGuard
|
||||||
|
// resumes handshake attempts on the direct path.
|
||||||
|
a.devAddProbe(p, p.WGEndpoint())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user