Comparing version 8.2.0 to 8.2.1
@@ -0,1 +1,3 @@ | ||
/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^Readable$" }] */ | ||
'use strict'; | ||
@@ -9,2 +11,3 @@ | ||
const { randomBytes, createHash } = require('crypto'); | ||
const { Readable } = require('stream'); | ||
const { URL } = require('url'); | ||
@@ -958,3 +961,3 @@ | ||
websocket._socket.removeListener('data', socketOnData); | ||
websocket._socket.resume(); | ||
process.nextTick(resume, websocket._socket); | ||
@@ -988,4 +991,9 @@ websocket._closeFrameReceived = true; | ||
websocket._socket.removeListener('data', socketOnData); | ||
websocket._socket.resume(); | ||
// | ||
// 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]); | ||
@@ -1039,2 +1047,12 @@ websocket.emit('error', err); | ||
/** | ||
* Resume a readable stream | ||
* | ||
* @param {Readable} stream The readable stream | ||
* @private | ||
*/ | ||
function resume(stream) { | ||
stream.resume(); | ||
} | ||
/** | ||
* The listener of the `net.Socket` `'close'` event. | ||
@@ -1041,0 +1059,0 @@ * |
{ | ||
"name": "ws", | ||
"version": "8.2.0", | ||
"version": "8.2.1", | ||
"description": "Simple to use, blazing fast and thoroughly tested websocket client and server for Node.js", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
126501
3677