mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-16 07:16:38 +00:00
[management] Send relay credentials with turn updates (#3164)
send relay credentials when sending turn credentials update to avoid removing servers from clients
This commit is contained in:
@@ -133,11 +133,14 @@ loop:
|
||||
}
|
||||
}
|
||||
if relay := update.Update.GetWiretrusteeConfig().GetRelay(); relay != nil {
|
||||
relayUpdates++
|
||||
if relayUpdates == 1 {
|
||||
firstRelayUpdate = relay
|
||||
} else {
|
||||
secondRelayUpdate = relay
|
||||
// avoid updating on turn updates since they also send relay credentials
|
||||
if update.Update.GetWiretrusteeConfig().GetTurns() == nil {
|
||||
relayUpdates++
|
||||
if relayUpdates == 1 {
|
||||
firstRelayUpdate = relay
|
||||
} else {
|
||||
secondRelayUpdate = relay
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user