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

ws

Package Overview
Dependencies
Maintainers
2
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 0.6.2 to 0.6.3

5

History.md

@@ -0,1 +1,6 @@

v0.6.3 - December 8th 2014
=====================
* Fix an error when permessage-deflate is enabled and closing socket [nkzawa]
v0.6.1 - v.0.6.2 - December 6th 2014

@@ -2,0 +7,0 @@ =====================

3

lib/Receiver.js

@@ -328,3 +328,3 @@ /*!

Receiver.prototype.flush = function() {
if (this.processing) return;
if (this.processing || this.dead) return;

@@ -353,2 +353,3 @@ var handler = this.messageHandlers.shift();

this.extensions[PerMessageDeflate.extensionName].decompress(messageBuffer, fin, function(err, buffer) {
if (self.dead) return;
if (err) {

@@ -355,0 +356,0 @@ callback(new Error('invalid compressed data'));

@@ -41,3 +41,3 @@ /*!

Sender.prototype.close = function(code, data, mask) {
Sender.prototype.close = function(code, data, mask, cb) {
if (typeof code !== 'undefined') {

@@ -56,2 +56,3 @@ if (typeof code !== 'number' ||

callback();
cb();
});

@@ -58,0 +59,0 @@ this.flush();

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

var self = this;
try {

@@ -114,7 +115,8 @@ this.readyState = WebSocket.CLOSING;

var mask = !this._isServer;
this._sender.close(code, data, mask);
this._sender.close(code, data, mask, function(err) {
if (err) self.emit('error', err);
self.terminate();
});
} catch (e) {
this.emit('error', e);
} finally {
this.terminate();
}

@@ -316,2 +318,4 @@ };

if (this._socket) {
this.readyState = WebSocket.CLOSING;
// End the connection

@@ -318,0 +322,0 @@ try { this._socket.end(); }

@@ -35,3 +35,3 @@ /*!

clientTracking: true,
perMessageDeflate: false
perMessageDeflate: true
}).merge(options);

@@ -38,0 +38,0 @@

@@ -5,3 +5,3 @@ {

"description": "simple to use, blazing fast and thoroughly tested websocket client, server and console for node.js, up-to-date against RFC-6455",
"version": "0.6.2",
"version": "0.6.3",
"license": "MIT",

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

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