Skip to content
Snippets Groups Projects
Unverified Commit 7e836f3f authored by Éloïs's avatar Éloïs
Browse files

[fix] #1220

parent 5eb2f7d4
No related branches found
No related tags found
3 merge requests!1222Add startup scripts,!1220Stable/ws2p v1.1 trymerge,!1208Stable/ws2p v1.1
...@@ -278,9 +278,12 @@ export class WS2PCluster { ...@@ -278,9 +278,12 @@ export class WS2PCluster {
clientsCount() { clientsCount() {
let count = 0 let count = 0
let connectedKeys:string[] = []
for (const ws2pid in this.ws2pClients) { for (const ws2pid in this.ws2pClients) {
if (this.ws2pClients[ws2pid].connection.pubkey != this.server.conf.pair.pub) { if (this.ws2pClients[ws2pid].connection.pubkey != this.server.conf.pair.pub
&& connectedKeys.indexOf(this.ws2pClients[ws2pid].connection.pubkey) == -1) {
count++ count++
connectedKeys.push(this.ws2pClients[ws2pid].connection.pubkey)
} }
} }
return count return count
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment