From e48536f4cda60987037652616eda73dc39f4122c Mon Sep 17 00:00:00 2001 From: isaacs Date: Sun, 14 Jul 2013 20:08:07 -0700 Subject: [PATCH] tls: Trivial use_strict fix --- lib/tls.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/tls.js b/lib/tls.js index af15867aa48..0907b290f32 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(); + } };