Skip to content

Commit

Permalink
tls: Trivial use_strict fix
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Jul 15, 2013
1 parent 875dd37 commit e48536f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/tls.js
Original file line number Diff line number Diff line change
Expand Up @@ -646,15 +646,16 @@ CryptoStream.prototype.destroySoon = function(err) {
// was written on this side was read from the other side.
var self = this;
var waiting = 1;
function finish() {
if (--waiting === 0) self.destroy();
}
this._opposite.once('end', finish);
if (!this._finished) {
this.once('finish', finish);
++waiting;
}
}

function finish() {
if (--waiting === 0) self.destroy();
}
};


Expand Down

0 comments on commit e48536f

Please sign in to comment.