Skip to content
Snippets Groups Projects
Commit 2a85bfb5 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

[fix] Do not remove a peer from the database

parent 5647a1f4
No related branches found
No related tags found
No related merge requests found
...@@ -111,12 +111,6 @@ export class PeeringService { ...@@ -111,12 +111,6 @@ export class PeeringService {
if(!found && thePeerDTO.endpoints.length === 0){ if(!found && thePeerDTO.endpoints.length === 0){
throw 'Peer with zero endpoints that is not already known' throw 'Peer with zero endpoints that is not already known'
} }
if(found && thePeerDTO.endpoints.length === 0){
// This peer is saying "I'm no more joinable"
// ==> Remove it from the database
await this.dal.removePeerByPubkey(thePeerDTO.pubkey)
return thePeerDTO
}
else if(found){ else if(found){
// Already existing peer // Already existing peer
const sp2 = found.block.split('-'); const sp2 = found.block.split('-');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment