mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-16 07:16:38 +00:00
Fix Peer Deletion & HTTP endpoints (#319)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package server
|
||||
|
||||
import (
|
||||
log "github.com/sirupsen/logrus"
|
||||
"net"
|
||||
"strings"
|
||||
"time"
|
||||
@@ -262,7 +263,11 @@ func (am *DefaultAccountManager) GetNetworkMap(peerKey string) (*NetworkMap, err
|
||||
|
||||
for _, g := range groups {
|
||||
for _, pid := range g.Peers {
|
||||
peer := account.Peers[pid]
|
||||
peer, ok := account.Peers[pid]
|
||||
if !ok {
|
||||
log.Warnf("peer %s found in group %s but doesn't belong to account %s", pid, g.ID, account.Id)
|
||||
continue
|
||||
}
|
||||
// exclude original peer
|
||||
if peer.Key != peerKey {
|
||||
res = append(res, peer.Copy())
|
||||
|
||||
Reference in New Issue
Block a user