Fixed bug - update probe address if it changes between ticks
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user