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

ws

Package Overview
Dependencies
Maintainers
4
Versions
169
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ws - npm Package Compare versions

Comparing version 8.2.1 to 8.2.2

25

lib/websocket.js

@@ -959,5 +959,2 @@ /* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^Readable$" }] */

websocket._socket.removeListener('data', socketOnData);
process.nextTick(resume, websocket._socket);
websocket._closeFrameReceived = true;

@@ -967,2 +964,7 @@ websocket._closeMessage = reason;

if (websocket._socket[kWebSocket] === undefined) return;
websocket._socket.removeListener('data', socketOnData);
process.nextTick(resume, websocket._socket);
if (code === 1005) websocket.close();

@@ -990,11 +992,14 @@ else websocket.close(code, reason);

websocket._socket.removeListener('data', socketOnData);
if (websocket._socket[kWebSocket] !== undefined) {
websocket._socket.removeListener('data', socketOnData);
//
// On Node.js < 14.0.0 the `'error'` event is emitted synchronously. See
// https://github.com/websockets/ws/issues/1940.
//
process.nextTick(resume, websocket._socket);
//
// On Node.js < 14.0.0 the `'error'` event is emitted synchronously. See
// https://github.com/websockets/ws/issues/1940.
//
process.nextTick(resume, websocket._socket);
websocket.close(err[kStatusCode]);
websocket.close(err[kStatusCode]);
}
websocket.emit('error', err);

@@ -1001,0 +1006,0 @@ }

4

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

@@ -55,3 +55,3 @@ "keywords": [

"eslint-config-prettier": "^8.1.0",
"eslint-plugin-prettier": "^3.0.1",
"eslint-plugin-prettier": "^4.0.0",
"mocha": "^8.4.0",

@@ -58,0 +58,0 @@ "nyc": "^15.0.0",

# ws: a Node.js WebSocket library
[![Version npm](https://img.shields.io/npm/v/ws.svg?logo=npm)](https://www.npmjs.com/package/ws)
[![Build](https://img.shields.io/github/workflow/status/websockets/ws/CI/master?label=build&logo=github)](https://github.com/websockets/ws/actions?query=workflow%3ACI+branch%3Amaster)
[![Windows x86 Build](https://img.shields.io/appveyor/ci/lpinca/ws/master.svg?logo=appveyor)](https://ci.appveyor.com/project/lpinca/ws)
[![CI](https://img.shields.io/github/workflow/status/websockets/ws/CI/master?label=CI&logo=github)](https://github.com/websockets/ws/actions?query=workflow%3ACI+branch%3Amaster)
[![Coverage Status](https://img.shields.io/coveralls/websockets/ws/master.svg?logo=coveralls)](https://coveralls.io/github/websockets/ws)

@@ -7,0 +6,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