Comparing version 8.2.1 to 8.2.2
@@ -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 @@ } |
{ | ||
"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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3680
126490
496