New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hyperdht

Package Overview
Dependencies
Maintainers
3
Versions
66
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.11.6 to 6.11.7

7

index.js

@@ -51,2 +51,7 @@ const DHT = require('dht-rpc')

})
this.on('network-update', () => {
if (!this.online) return
for (const server of this.listening) server.notifyOnline()
})
}

@@ -190,2 +195,4 @@

if (!data.from.id) return data
unannounces.push(

@@ -192,0 +199,0 @@ dht._requestUnannounce(

@@ -21,2 +21,3 @@ const safetyCatch = require('safety-catch')

this.record = c.encode(m.peer, { publicKey: keyPair.publicKey, relayAddresses: [] })
this.online = new Signal()

@@ -51,2 +52,6 @@ this._refreshing = false

// Suspend has its own sleep logic
// so we don't want to hang on this one
this.online.notify()
if (this._activeQuery) this._activeQuery.destroy()

@@ -85,2 +90,3 @@

this.stopped = true
this.online.notify() // Break out of the _background loop if we're offline
this._sleeper.resume()

@@ -123,2 +129,8 @@ this._resumed.notify()

if (!this.stopped) await this._runUpdate()
while (!this.dht.online && !this.stopped && !this.suspended) {
// Being offline can make _background repeat very quickly
// So wait until we're back online
await this.online.wait()
}
} catch (err) {

@@ -125,0 +137,0 @@ safetyCatch(err)

4

lib/server.js

@@ -190,2 +190,6 @@ const { EventEmitter } = require('events')

notifyOnline () {
if (this._announcer) this._announcer.online.notify()
}
_localAddresses () {

@@ -192,0 +196,0 @@ return this.dht.validateLocalAddresses(Holepuncher.localAddresses(this.dht.io.serverSocket))

2

package.json
{
"name": "hyperdht",
"version": "6.11.6",
"version": "6.11.7",
"description": "The DHT powering Hyperswarm",

@@ -5,0 +5,0 @@ "main": "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