mirror of
https://github.com/netbirdio/netbird.git
synced 2024-12-12 09:50:47 +01:00
chore: [management] - fix golint
This commit is contained in:
parent
09eeb71af2
commit
ab579f5de0
@ -163,6 +163,9 @@ func (s *Server) schedulePeerUpdates(context context.Context, peerKey string, pe
|
||||
|
||||
update := toSyncResponse(s.config, peer, peers, nil)
|
||||
err = s.peersUpdateManager.SendUpdate(peerKey, &UpdateMessage{Update: update})
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
@ -1,6 +1,7 @@
|
||||
package server
|
||||
|
||||
import (
|
||||
"github.com/wiretrustee/wiretrustee/management/proto"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
"net"
|
||||
@ -122,7 +123,8 @@ func (am *AccountManager) DeletePeer(accountId string, peerKey string) (*Peer, e
|
||||
return nil, err
|
||||
}
|
||||
|
||||
/*err = am.peersUpdateManager.SendUpdate(peerKey,
|
||||
// notify peer itself
|
||||
err = am.peersUpdateManager.SendUpdate(peerKey,
|
||||
&UpdateMessage{
|
||||
Update: &proto.SyncResponse{
|
||||
RemotePeers: []*proto.RemotePeerConfig{},
|
||||
@ -130,10 +132,10 @@ func (am *AccountManager) DeletePeer(accountId string, peerKey string) (*Peer, e
|
||||
}})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}*/
|
||||
}
|
||||
|
||||
//notify other peers of the change
|
||||
peers, err := am.Store.GetAccountPeers(accountId)
|
||||
/*peers, err := am.Store.GetAccountPeers(accountId)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -145,7 +147,7 @@ func (am *AccountManager) DeletePeer(accountId string, peerKey string) (*Peer, e
|
||||
peersToSend = append(peersToSend, remote)
|
||||
}
|
||||
}
|
||||
/*update := toRemotePeerConfig(peersToSend)
|
||||
update := toRemotePeerConfig(peersToSend)
|
||||
err = am.peersUpdateManager.SendUpdate(p.Key,
|
||||
&UpdateMessage{
|
||||
Update: &proto.SyncResponse{
|
||||
@ -154,8 +156,8 @@ func (am *AccountManager) DeletePeer(accountId string, peerKey string) (*Peer, e
|
||||
}})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}*/
|
||||
}
|
||||
}
|
||||
} */
|
||||
|
||||
am.peersUpdateManager.CloseChannel(peerKey)
|
||||
return peer, nil
|
||||
|
Loading…
Reference in New Issue
Block a user