+5
-5
@@ -37,6 +37,6 @@ const DHT = require('dht-rpc') | ||
| this.stats = { punches: { consistent: 0, random: 0, open: 0 }, ...this.stats } | ||
| this.rawStreams = new RawStreamSet(this) | ||
| this._router = new Router(this, router) | ||
| this._socketPool = new SocketPool(this, opts.host || '0.0.0.0') | ||
| this._rawStreams = new RawStreamSet(this) | ||
| this._persistent = null | ||
@@ -99,7 +99,7 @@ this._validatedLocalAddresses = new Map() | ||
| log('Done, clearing all raw streams') | ||
| await this._rawStreams.clear() | ||
| await this.rawStreams.clear() | ||
| log('Done, suspending dht-rpc') | ||
| await super.suspend({ log }) | ||
| log('Done, clearing raw streams again') | ||
| await this._rawStreams.clear() | ||
| await this.rawStreams.clear() | ||
| log('Done, hyperdht fully suspended') | ||
@@ -117,3 +117,3 @@ this._connectable = true | ||
| if (this._persistent) this._persistent.destroy() | ||
| await this._rawStreams.clear() | ||
| await this.rawStreams.clear() | ||
| await this._socketPool.destroy() | ||
@@ -437,3 +437,3 @@ await super.destroy() | ||
| createRawStream (opts) { | ||
| return this._rawStreams.add(opts) | ||
| return this.rawStreams.add(opts) | ||
| } | ||
@@ -440,0 +440,0 @@ |
@@ -9,2 +9,10 @@ module.exports = class RawStreamSet { | ||
| get size () { | ||
| return this._streams.size | ||
| } | ||
| [Symbol.iterator] () { | ||
| return this._streams.values() | ||
| } | ||
| add (opts) { | ||
@@ -11,0 +19,0 @@ const self = this |
+1
-1
| { | ||
| "name": "hyperdht", | ||
| "version": "6.22.0", | ||
| "version": "6.23.0", | ||
| "description": "The DHT powering Hyperswarm", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
143287
0.08%3956
0.15%