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

@cloudgaming/rpc

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cloudgaming/rpc - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

17

dist/Client.js

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

const RETRY_TIMEOUT_BASE = 1000;
const CONNECT_TIMEOUT = 10000;
class Client extends class {

@@ -132,2 +133,15 @@ } {

await new Promise((resolve, reject) => {
const ws = this.websocket;
const onTimeout = () => {
cleanUp();
debug('connect timeout');
try {
ws.addEventListener('open', () => ws.close());
ws.close();
}
catch {
// just ignore
}
reject(new Error('Connection Timeout'));
};
const onOpen = () => {

@@ -144,7 +158,8 @@ cleanUp();

};
const ws = this.websocket;
function cleanUp() {
clearTimeout(timeout);
ws.removeEventListener('open', onOpen);
ws.removeEventListener('error', onReject);
}
const timeout = setTimeout(onTimeout, CONNECT_TIMEOUT);
this.websocket.addEventListener('open', onOpen);

@@ -151,0 +166,0 @@ this.websocket.addEventListener('error', onReject);

2

package.json
{
"name": "@cloudgaming/rpc",
"version": "1.0.0",
"version": "1.0.1",
"main": "dist/index.js",

@@ -5,0 +5,0 @@ "type": "commonjs",

Sorry, the diff of this file is not supported yet

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