Use select for turn credentials and peers update (#443)

Also, prevent peer update when SSH is the same
This commit is contained in:
Maycon Santos
2022-08-27 12:57:03 +02:00
committed by GitHub
parent dd4ff61b51
commit c13f0b9f07
4 changed files with 62 additions and 10 deletions

View File

@@ -390,6 +390,11 @@ func (am *DefaultAccountManager) UpdatePeerSSHKey(peerKey string, sshKey string)
return err
}
if peer.SSHKey == sshKey {
log.Debugf("same SSH key provided for peer %s, skipping update", peerKey)
return nil
}
account, err := am.Store.GetPeerAccount(peerKey)
if err != nil {
return err