Return the proper error when a peer is deleted (#2035)

this fixes an issue causing peers to keep retrying the connection after a peer is removed from the management system
This commit is contained in:
Maycon Santos
2024-05-23 14:59:09 +02:00
committed by GitHub
parent 2e315311e0
commit 9d3db68805
2 changed files with 7 additions and 1 deletions

View File

@@ -136,7 +136,7 @@ func (s *GRPCServer) Sync(req *proto.EncryptedMessage, srv proto.ManagementServi
peer, netMap, err := s.accountManager.SyncAndMarkPeer(peerKey.String(), realIP)
if err != nil {
return err
return mapError(err)
}
err = s.sendInitialSync(peerKey, peer, netMap, srv)