This commit is contained in:
jdl
2026-06-12 18:22:25 +02:00
parent 9a3cb2d1c2
commit 926e111c3f
2 changed files with 10 additions and 9 deletions

View File

@@ -57,7 +57,12 @@ func (a *App) devSetRelay(p *Peer, endpoint netip.AddrPort) {
}
func (a *App) devPromote(p *Peer) {
log.Printf("PROMOTED: %s - %s @ %s", p.Name, p.VPNIP.String(), p.WGEndpoint().String())
ep := p.WGEndpoint()
if ep.IsValid() {
log.Printf("PROMOTED: %s - %s @ %s", p.Name, p.VPNIP.String(), p.WGEndpoint().String())
} else {
log.Printf("PROMOTED: %s - %s (no IP)", p.Name, p.VPNIP.String())
}
devRetry(p.VPNIP, "Promote", func() error { return a.dev.Promote(p.PubKey(), p.VPNIP) })
p.State = StateDirect
}