Socket
Socket
Sign inDemoInstall

ssb-conn

Package Overview
Dependencies
Maintainers
1
Versions
92
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ssb-conn - npm Package Compare versions

Comparing version 3.1.0 to 3.2.0

8

CHANGELOG.md

@@ -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 @@

7

lib/conn-scheduler.js

@@ -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)))

2

package.json
{
"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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc