summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2013-07-14 20:08:07 -0700
committerisaacs <i@izs.me>2013-07-14 20:08:07 -0700
commite48536f4cda60987037652616eda73dc39f4122c (patch)
tree75c9f2397db069b1a980ad0e1b8ad9342dd9c557
parent875dd37a93b4d774bf0505c9e18081510b4a0f43 (diff)
downloadnode-e48536f4cda60987037652616eda73dc39f4122c.tar.gz
tls: Trivial use_strict fix
-rw-r--r--lib/tls.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/tls.js b/lib/tls.js
index af15867aa..0907b290f 100644
--- a/lib/tls.js
+++ b/lib/tls.js
@@ -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();
+ }
};