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

@syncot/connection

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@syncot/connection - npm Package Compare versions

Comparing version 0.0.9 to 0.0.10

1

lib/manager.d.ts

@@ -42,2 +42,3 @@ import { SyncOtEmitter } from '@syncot/util';

* How many times longer to wait on each subsequent reconnect attempt.
* If set to 0, a random delay is used every time.
* Default is 1.5.

@@ -44,0 +45,0 @@ */

9

lib/manager.js

@@ -1,2 +0,2 @@

import { SyncOtEmitter } from '@syncot/util';
import { randomInteger, SyncOtEmitter } from '@syncot/util';
import { strict as assert } from 'assert';

@@ -34,3 +34,4 @@ /**

this.maxDelay >= this.minDelay, 'Argument "maxDelay" must be a safe integer >= minDelay.');
assert.ok(Number.isFinite(this.delayFactor) && this.delayFactor >= 1, 'Argument "delayFactor" must be a finite number >= 1.');
assert.ok(Number.isFinite(this.delayFactor) &&
(this.delayFactor >= 1 || this.delayFactor === 0), 'Argument "delayFactor" must be a finite number >= 1 or == 0.');
this.connection.on('connect', this.onConnect);

@@ -74,3 +75,5 @@ this.connection.on('disconnect', this.onDisconnect);

? 0
: Math.min(this.maxDelay, this.minDelay * Math.pow(this.delayFactor, this.attempt));
: this.delayFactor === 0
? randomInteger(this.minDelay, this.maxDelay)
: Math.min(this.maxDelay, this.minDelay * Math.pow(this.delayFactor, this.attempt));
this.attempt++;

@@ -77,0 +80,0 @@ this.scheduledConnect = setTimeout(() => {

{
"name": "@syncot/connection",
"version": "0.0.9",
"version": "0.0.10",
"description": "An RPC library for communication over Duplex object streams.",

@@ -36,3 +36,3 @@ "keywords": [

},
"gitHead": "10a2aa8510e10b1ed034fa61a75d30dc1613e932"
"gitHead": "38411f33bb5b260da49fbcd92c47157a4ee40c03"
}
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