Skip to content

Commit 3450507

Browse files
committed
Fixed double disconnect events.
1 parent 0a2d0b9 commit 3450507

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/transport.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,11 +356,13 @@ Transport.prototype.onMessage = function (packet) {
356356
if ('disconnect' == packet.type && packet.endpoint == '') {
357357
this.log.debug('got disconnection packet');
358358

359-
if (current && current.open) {
359+
if (current) {
360360
current.onForcedDisconnect();
361361
} else {
362362
this.store.publish('disconnect-force:' + this.id);
363363
}
364+
365+
return;
364366
}
365367

366368
if (packet.id && packet.ack != 'data') {

0 commit comments

Comments
 (0)