Socket
Socket
Sign inDemoInstall

@push-rpc/core

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@push-rpc/core - npm Package Compare versions

Comparing version 1.6.1 to 1.6.2

1

dist/client.d.ts

@@ -30,2 +30,3 @@ import { RpcSession } from "./RpcSession";

delayCalls: number;
connectionTimeout: number;
}

@@ -32,0 +33,0 @@ export declare class RpcClient<R> {

16

dist/client.js

@@ -76,2 +76,3 @@ "use strict";

delayCalls: 0,
connectionTimeout: 10 * 1000,
};

@@ -121,9 +122,10 @@ var RpcClient = /** @class */ (function () {

connected_1 = false;
timer = setTimeout(function () {
if (!connected_1)
reject(new Error("Connection timeout"));
}, 10 * 1000) // 10s connection timeout
;
if (timer.unref) {
timer.unref();
if (this.opts.connectionTimeout) {
timer = setTimeout(function () {
if (!connected_1)
reject(new Error("Connection timeout"));
}, this.opts.connectionTimeout);
if (timer.unref) {
timer.unref();
}
}

@@ -130,0 +132,0 @@ socket_1.onOpen(function () {

{
"name": "@push-rpc/core",
"version": "1.6.1",
"version": "1.6.2",
"main": "dist/index.js",

@@ -21,3 +21,3 @@ "types": "dist/index.d.ts",

},
"gitHead": "c0d75bc93b480a01668e03dc0d1d5909d06999ca"
"gitHead": "b9fbe8dfcc2461679e7cfb0ee0268a1082777f50"
}

@@ -32,2 +32,3 @@ import {RpcSession} from "./RpcSession"

delayCalls: number
connectionTimeout: number
}

@@ -58,2 +59,3 @@

delayCalls: 0,
connectionTimeout: 10 * 1000,
}

@@ -91,8 +93,10 @@

const timer = setTimeout(() => {
if (!connected) reject(new Error("Connection timeout"))
}, 10 * 1000) // 10s connection timeout
if (this.opts.connectionTimeout) {
const timer = setTimeout(() => {
if (!connected) reject(new Error("Connection timeout"))
}, this.opts.connectionTimeout)
if (timer.unref) {
timer.unref()
if (timer.unref) {
timer.unref()
}
}

@@ -99,0 +103,0 @@

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