You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

hyperdht

Package Overview
Dependencies
Maintainers
3
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hyperdht - npm Package Compare versions

Comparing version
6.20.2
to
6.20.3
+9
-1
lib/announcer.js

@@ -48,6 +48,8 @@ const safetyCatch = require('safety-catch')

async suspend () {
async suspend ({ log = noop } = {}) {
if (this.suspended) return
this.suspended = true
log('Suspending announcer')
// Suspend has its own sleep logic

@@ -61,5 +63,9 @@ // so we don't want to hang on this one

if (this._updating) await this._updating
log('Suspending announcer (post update)')
if (this.suspended === false || this.stopped) return
log('Suspending announcer (pre unannounce)')
await this._unannounceCurrent()
log('Suspending announcer (post unannounce)')
}

@@ -289,1 +295,3 @@

}
function noop () {}
+4
-2

@@ -62,7 +62,9 @@ const { EventEmitter } = require('events')

async suspend () {
async suspend ({ log = noop } = {}) {
log('Suspending hyperdht server')
if (this._listening !== null) await this._listening
log('Suspending hyperdht server (post listening)')
this.suspended = true
this._clearAll()
return this._announcer ? this._announcer.suspend() : Promise.resolve()
return this._announcer ? this._announcer.suspend({ log }) : Promise.resolve()
}

@@ -69,0 +71,0 @@

{
"name": "hyperdht",
"version": "6.20.2",
"version": "6.20.3",
"description": "The DHT powering Hyperswarm",

@@ -5,0 +5,0 @@ "main": "index.js",