Comparing version 3.1.0 to 3.2.0
@@ -0,1 +1,9 @@ | ||
# 3.2.0 | ||
- Improve the scheduler: disconnect to excess peers after a long and random delay that is inversely proportional to the size of the excess. The randomization is important to avoid "back and forth dances" where remote peers connect to you, but you disconnect from them, which leads them to immediately attempt a reconnect to you, and so forth | ||
# 3.1.0 | ||
- If already connected to a peer, `ssb.conn.connect()` will just return the RPC instance of that connected peer, instead of `false`. See https://github.com/staltz/ssb-conn-hub/commit/7a8a880d4abf74cc916febbe6efe441a23aed590 | ||
# 3.0.0 | ||
@@ -2,0 +10,0 @@ |
@@ -223,3 +223,8 @@ "use strict"; | ||
.z(take(excess)) | ||
.forEach(([addr]) => this.ssb.conn.disconnect(addr)); | ||
.forEach(([addr]) => { | ||
const fuzzyPeriod = (120e3 * (0.5 + Math.random())) / excess; | ||
setTimeout(() => { | ||
this.ssb.conn.disconnect(addr); | ||
}, fuzzyPeriod); | ||
}); | ||
z(peersDown) | ||
@@ -226,0 +231,0 @@ .z(peers => peers.filter(p => !this.weBlockThem(p))) |
{ | ||
"name": "ssb-conn", | ||
"description": "SSB plugin for establishing and managing peer connections", | ||
"version": "3.1.0", | ||
"version": "3.2.0", | ||
"homepage": "https://github.com/staltz/ssb-conn", | ||
@@ -6,0 +6,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
58596
966