Socket
Socket
Sign inDemoInstall

resilient-websocket

Package Overview
Dependencies
0
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.10 to 1.0.11

1

dist/ResilientWebSocket.d.ts

@@ -39,2 +39,3 @@ export interface OnCallback {

close: () => void;
private cleanup;
on: (event: WebSocketEvent, callback: OnCallback) => void;

@@ -41,0 +42,0 @@ off: (event: WebSocketEvent, callback: OnCallback) => void;

10

dist/ResilientWebSocket.js

@@ -53,2 +53,7 @@ "use strict";

this.close = function () {
_this.socket.close();
_this.respondToCallbacks(WebSocketEvent.CLOSE, _this);
_this.cleanup();
};
this.cleanup = function () {
clearTimeout(_this.pongTimeout);

@@ -60,4 +65,2 @@ clearInterval(_this.pingTimeout);

_this.socket.removeEventListener('close', _this.onClose);
_this.socket.close();
_this.respondToCallbacks(WebSocketEvent.CLOSE, _this);
};

@@ -118,5 +121,4 @@ this.on = function (event, callback) {

this.onClose = function (event) {
_this.cleanup();
_this.respondToCallbacks(WebSocketEvent.CLOSE, event);
clearInterval(_this.pingTimeout);
clearTimeout(_this.pongTimeout);
setTimeout(function () {

@@ -123,0 +125,0 @@ _this.socket = _this.connect();

{
"name": "resilient-websocket",
"version": "1.0.10",
"version": "1.0.11",
"description": "A client WebSocket wrapper with support for reconnection and ping/pong",

@@ -5,0 +5,0 @@ "main": "dist/ResilientWebSocket.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc