Skip to content

Commit a3496ed

Browse files
konstantinzolotarevdarrachequesne
authored andcommitted
[fix] Discard packets when socket is closed (#469)
1 parent 57ec952 commit a3496ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/socket.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ Socket.prototype.sendPacket = function (type, data, options, callback) {
379379
options = options || {};
380380
options.compress = false !== options.compress;
381381

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

385385
var packet = {

0 commit comments

Comments
 (0)