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

Unverified Commit 9ce00774 authored by Éloïs's avatar Éloïs
Browse files

[fix] replace hardcoded max ws2p quota by constant

parent fa52b6a3
......@@ -139,7 +139,7 @@ export class WS2PServer extends events.EventEmitter {
async removeExcessIncomingConnections() {
await this.removeDuplicateConnections()
const ws2pPublicMax = (this.server.conf.ws2p && this.server.conf.ws2p.maxPublic) ? this.server.conf.ws2p.maxPublic:10
const ws2pPublicMax = (this.server.conf.ws2p && this.server.conf.ws2p.maxPublic) ? this.server.conf.ws2p.maxPublic:WS2PConstants.MAX_LEVEL_2_PEERS
let privilegedKeys = (this.server.conf.ws2p && this.server.conf.ws2p.privilegedNodes) ? this.server.conf.ws2p.privilegedNodes:[]
while (this.countConnexions() > ws2pPublicMax) {
await this.removeLowPriorityConnection(privilegedKeys)
......
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