Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dxos/broadcast

Package Overview
Dependencies
Maintainers
5
Versions
735
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dxos/broadcast - npm Package Compare versions

Comparing version 1.0.0-beta.3 to 1.0.0-beta.4

20

dist/broadcast.js

@@ -207,15 +207,15 @@ "use strict";

const waitFor = this._peers.map(async peer => {
if (!this._running) return; // Don't send the message to neighbors that have already seen the message.
const waitFor = this._peers.map(peer => {
if (!this._running) return; // Don't send the message to the origin peer.
if (this._seenSeqs.has(msgId(packet.seqno, peer.id))) return;
if (packet.origin.equals(peer.id)) Promise.resolve(); // Don't send the message to neighbors that have already seen the message.
if (this._seenSeqs.has(msgId(packet.seqno, peer.id))) return Promise.resolve();
log('publish %h -> %h', this._id, peer.id, packet);
try {
this._seenSeqs.add(msgId(packet.seqno, peer.id));
this._seenSeqs.add(msgId(packet.seqno, peer.id));
await this._send(packetEncoded, peer, options);
} catch (err) {
return this._send(packetEncoded, peer, options).catch(err => {
this.emit('send-error', err);
}
});
});

@@ -242,5 +242,7 @@

try {
const packet = this._codec.decode(packetEncoded); // Cache the packet as "seen by the peer from".
const packet = this._codec.decode(packetEncoded); // Ignore packets produced by me and forwarded by others
if (packet.origin.equals(this._id)) return; // Cache the packet as "seen by the peer from".
this._seenSeqs.add(msgId(packet.seqno, packet.from)); // Check if I already see this packet.

@@ -247,0 +249,0 @@

{
"name": "@dxos/broadcast",
"version": "1.0.0-beta.3",
"version": "1.0.0-beta.4",
"description": "Abstract module to send broadcast messages.",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/dxos/broadcast#readme",

Sorry, the diff of this file is not supported yet

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