Skip to content

Commit

Permalink
Fixed; force disconnection can still happen even with temporarily clo…
Browse files Browse the repository at this point in the history
…sed transports.
  • Loading branch information
rauchg committed Jun 11, 2011
1 parent 1e50ac9 commit 19c62c1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/transport.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,11 @@ Transport.prototype.onSocketDrain = function () {
*/

Transport.prototype.onForcedDisconnect = function () {
if (!this.disconnected && this.open) {
if (!this.disconnected) {
this.log.info('transport end by forced client disconnection');
this.packet({ type: 'disconnect' });
if (this.open) {
this.packet({ type: 'disconnect' });
}
this.end(true);
}
};
Expand Down

0 comments on commit 19c62c1

Please sign in to comment.