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

jsonrpc2-ws

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsonrpc2-ws - npm Package Compare versions

Comparing version 1.0.0-beta15 to 1.0.0-beta16

2

lib/server.d.ts

@@ -114,3 +114,3 @@ /// <reference types="node" />

/** (internal using for heartbeat) */
_lastPongAt: number;
_pongAt: number;
constructor(ws: WebSocket);

@@ -117,0 +117,0 @@ /**

@@ -81,3 +81,3 @@ "use strict";

ws.on("pong", function _onPongWS() {
socket._lastPongAt = Date.now();
socket._pongAt = Date.now();
});

@@ -186,6 +186,7 @@ self.emit("connection", socket, req);

for (const socket of this.sockets.values()) {
if (socket._lastPongAt > deadline) {
if (socket._pongAt === -1 || socket._pongAt > deadline) {
socket.terminate();
continue;
}
socket._pongAt = -1;
socket.ws.ping();

@@ -206,3 +207,3 @@ }

/** (internal using for heartbeat) */
this._lastPongAt = 0;
this._pongAt = 0;
}

@@ -209,0 +210,0 @@ /**

{
"name": "jsonrpc2-ws",
"version": "1.0.0-beta15",
"version": "1.0.0-beta16",
"description": "Yet Another Server Library which Implementation of JSON-RPC 2.0 over WebSocket for Node.js (w/ TypeScript)",

@@ -5,0 +5,0 @@ "keywords": [

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