Socket
Socket
Sign inDemoInstall

ssb-conn

Package Overview
Dependencies
96
Maintainers
1
Versions
92
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.13.1 to 0.14.0

5

lib/conn-scheduler.js

@@ -108,7 +108,8 @@ "use strict";

this.closed = false;
for (let [address, { source, type }] of this.ssb.conn.dbPeers()) {
for (let [address, { source, type, failure }] of this.ssb.conn.dbPeers()) {
if (source === 'local' ||
source === 'bt' ||
type === 'lan' ||
type === 'bt') {
type === 'bt' ||
((failure !== null && failure !== void 0 ? failure : 0)) > 200) {
this.ssb.conn.forget(address);

@@ -115,0 +116,0 @@ }

6

package.json
{
"name": "ssb-conn",
"description": "SSB plugin for establishing and managing peer connections",
"version": "0.13.1",
"version": "0.14.0",
"homepage": "https://github.com/staltz/ssb-conn",

@@ -28,3 +28,3 @@ "main": "lib/index.js",

"ssb-ref": "^2.13.9",
"ssb-typescript": "^1.4.0",
"ssb-typescript": "^1.5.0",
"statistics": "^3.3.0",

@@ -37,3 +37,3 @@ "zii": "~1.1.0"

"devDependencies": {
"@types/node": "^13.1.8",
"@types/node": "^13.5.0",
"cont": "^1.0.3",

@@ -40,0 +40,0 @@ "secret-stack": "^6.3.1",

@@ -199,2 +199,9 @@ <div style="text-align:center" align="center">

**Database cleanups:**
Upon starting the scheduler:
- Remove database entries for any LAN or Bluetooth peers (these are rediscovered just-in-time)
- Remove database entries of peers that, after 200 attempts, we still fail to connect with
**Other events:**

@@ -201,0 +208,0 @@

@@ -506,3 +506,3 @@ import ConnQuery = require('ssb-conn-query');

// Upon init, purge some undesired DB entries
for (let [address, {source, type}] of this.ssb.conn.dbPeers()) {
for (let [address, {source, type, failure}] of this.ssb.conn.dbPeers()) {
if (

@@ -512,3 +512,4 @@ source === 'local' ||

type === 'lan' ||
type === 'bt'
type === 'bt' ||
(failure ?? 0) > 200
) {

@@ -515,0 +516,0 @@ this.ssb.conn.forget(address);

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc