Comparing version 0.6.2 to 0.6.3
@@ -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 @@ ===================== |
@@ -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": [ |
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
127961
2933