Socket
Socket
Sign inDemoInstall

ws

Package Overview
Dependencies
1
Maintainers
4
Versions
168
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.1.0 to 7.1.1

11

lib/websocket-server.js

@@ -13,2 +13,3 @@ 'use strict';

const keyRegex = /^[+/0-9A-Za-z]{22}==$/;
const kUsedByWebSocketServer = Symbol('kUsedByWebSocketServer');

@@ -86,2 +87,10 @@ /**

if (this._server) {
if (this._server[kUsedByWebSocketServer]) {
throw new Error(
'The HTTP/S server is already being used by another WebSocket server'
);
} else {
this._server[kUsedByWebSocketServer] = true;
}
this._removeListeners = addListeners(this._server, {

@@ -140,2 +149,4 @@ listening: this.emit.bind(this, 'listening'),

if (server) {
server[kUsedByWebSocketServer] = false;
this._removeListeners();

@@ -142,0 +153,0 @@ this._removeListeners = this._server = null;

2

package.json
{
"name": "ws",
"version": "7.1.0",
"version": "7.1.1",
"description": "Simple to use, blazing fast and thoroughly tested websocket client and server for Node.js",

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

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