Cleanup.
This commit is contained in:
1 parent
b86b43f1de
commit
fe9f15bec9
2 files changed
+12
-2
No files matched your search
@@ -28,8 +28,12 @@ func (a *App) onStateTick() {
|
||||
|
||||
switch p.State {
|
||||
case StateRelayed:
|
||||
// If we have an ep to probe, add it.
|
||||
if ep := p.PreferredEndpoint(); ep.IsValid() {
|
||||
if p.DirectAlive() {
|
||||
// We may already have a valid direct endpoint due to wireguard
|
||||
// roaming.
|
||||
a.devPromote(p)
|
||||
} else if ep := p.PreferredEndpoint(); ep.IsValid() {
|
||||
// If we have an ep to probe, add it.
|
||||
a.devAddProbe(p, ep)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user