Fixed relay selection - deterministic w/ fallback.
This commit is contained in:
@@ -61,8 +61,10 @@ func (a *App) onStateTick() {
|
||||
}
|
||||
}
|
||||
|
||||
// Ensure we have a live relay (if we're not public).
|
||||
if !a.isPublic && (a.relay == nil || !a.relay.Up()) {
|
||||
// Keep the active relay pinned to the lowest-IP live relay (if we're not
|
||||
// public). switchActiveRelay is idempotent and handles failover when the
|
||||
// current relay dies as well as failback when a lower-IP relay recovers.
|
||||
if !a.isPublic {
|
||||
a.switchActiveRelay()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user