Skip to content

Commit

Permalink
Fixed double disconnect events.
Browse files Browse the repository at this point in the history
  • Loading branch information
rauchg committed Jul 12, 2011
1 parent 0a2d0b9 commit 3450507
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/transport.js
Original file line number Diff line number Diff line change
Expand Up @@ -356,11 +356,13 @@ Transport.prototype.onMessage = function (packet) {
if ('disconnect' == packet.type && packet.endpoint == '') {
this.log.debug('got disconnection packet');

if (current && current.open) {
if (current) {
current.onForcedDisconnect();
} else {
this.store.publish('disconnect-force:' + this.id);
}

return;
}

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

0 comments on commit 3450507

Please sign in to comment.