Mise à jour de GitLab prévue ce samedi 23 octobre 2021 à partir de 9h00 CET

Commit d8e027fb authored by Éloïs's avatar Éloïs
Browse files

[mod] delete the prevention of the ws2p connection to oneself at the reception...

[mod] delete the prevention of the ws2p connection to oneself at the reception of the connection since now duniter does the verification before even the establishment of the ws2p connection.
parent 55079e60
......@@ -556,11 +556,7 @@ export class WS2PCluster {
let accept = priorityKeys.indexOf(pub) !== -1
if (!accept && connectedPubkeys.indexOf(pub) === -1) {
// Do we have room?
if (this.isThisNode(pub, targetWS2PUID)) {
// We do not connect to local host
return false
}
else if (getConcurrentConnexionsCount() < maxConcurrentConnexionsSize) {
if (getConcurrentConnexionsCount() < maxConcurrentConnexionsSize) {
// Yes: just connect to it
accept = true
}
......@@ -599,10 +595,6 @@ export class WS2PCluster {
return accept
}
isThisNode(pub:string, uuid:string) {
return !!(this.server.conf.pair.pub === pub && this.server.conf.ws2p && this.server.conf.ws2p.uuid === uuid)
}
isSiblingNode(pub:string, uuid:string) {
return !!(this.server.conf.pair.pub === pub && this.server.conf.ws2p && this.server.conf.ws2p.uuid !== uuid)
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment