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

hypercore-protocol

Package Overview
Dependencies
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hypercore-protocol - npm Package Compare versions

Comparing version 7.1.0 to 7.1.1

20

index.js

@@ -133,20 +133,22 @@ const SHP = require('simple-hypercore-protocol')

onclose (channelId, message) {
const ch = channelId < this.remote.length ? this.remote[channelId] : null
let ch = channelId < this.remote.length ? this.remote[channelId] : null
if (ch) {
this.remote[channelId] = null
if (ch.handlers && ch.handlers.onclose) ch.handlers.onclose()
} else if (message.discoveryKey) {
const local = this.getChannel(message.discoveryKey)
if (local && local.handlers && local.handlers.onclose) local.handlers.onclose()
ch = this.getChannel(message.discoveryKey)
}
if (ch && ch.localId > -1) {
if (!ch) return
if (ch.handlers && ch.handlers.onclose) {
ch.handlers.onclose()
}
if (ch.localId > -1) {
this.local[ch.localId] = null
}
if (ch) {
this.created.delete(ch.discoveryKey.toString('hex'))
this.stream._prefinalize()
}
this.created.delete(ch.discoveryKey.toString('hex'))
this.stream._prefinalize()
}

@@ -153,0 +155,0 @@

{
"name": "hypercore-protocol",
"version": "7.1.0",
"version": "7.1.1",
"description": "Stream that implements the hypercore protocol",

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