ssb-conn
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -10,3 +10,3 @@ "use strict"; | ||
exports.ConnScheduler = void 0; | ||
const ziii_1 = require("ziii"); | ||
const z = require("ziii"); | ||
const secret_stack_decorators_1 = require("secret-stack-decorators"); | ||
@@ -221,7 +221,7 @@ const ConnQuery = require("ssb-conn-query"); | ||
const freeSlots = Math.max(quota - peersUp.length, 0); | ||
ziii_1.default(peersUp) | ||
z(peersUp) | ||
.z(sortByStateChange) | ||
.z(take(excess)) | ||
.forEach(([addr]) => this.ssb.conn.disconnect(addr)); | ||
ziii_1.default(peersDown) | ||
z(peersDown) | ||
.z(peers => peers.filter(p => !this.weBlockThem(p))) | ||
@@ -310,3 +310,3 @@ .z(peers => peers.filter(canBeConnected)) | ||
}); | ||
ziii_1.default(conn.query().peersConnectable('staging').filter(this.weFollowThem)) | ||
z(conn.query().peersConnectable('staging').filter(this.weFollowThem)) | ||
.z(take(3 - conn.query().peersInConnection().filter(this.weFollowThem).length)) | ||
@@ -313,0 +313,0 @@ .forEach(([addr, data]) => conn.connect(addr, data)); |
{ | ||
"name": "ssb-conn", | ||
"description": "SSB plugin for establishing and managing peer connections", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"homepage": "https://github.com/staltz/ssb-conn", | ||
@@ -30,3 +30,3 @@ "main": "lib/index.js", | ||
"statistics": "^3.3.0", | ||
"ziii": "~1.0.1" | ||
"ziii": "~1.0.2" | ||
}, | ||
@@ -33,0 +33,0 @@ "peerDependencies": { |
69196
Updatedziii@~1.0.2