Skip to content

Commit

Permalink
[fix] Discard packets when socket is closed (#469)
Browse files Browse the repository at this point in the history
  • Loading branch information
konstantinzolotarev authored and darrachequesne committed Jan 5, 2017
1 parent 57ec952 commit a3496ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/socket.js
Expand Up @@ -379,7 +379,7 @@ Socket.prototype.sendPacket = function (type, data, options, callback) {
options = options || {};
options.compress = false !== options.compress;

if ('closing' !== this.readyState) {
if ('closing' !== this.readyState && 'closed' !== this.readyState) {
debug('sending packet "%s" (%s)', type, data);

var packet = {
Expand Down

0 comments on commit a3496ed

Please sign in to comment.