diff options
Diffstat (limited to 'lib/_tls_legacy.js')
-rw-r--r-- | lib/_tls_legacy.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/_tls_legacy.js b/lib/_tls_legacy.js index 3f6d20784b..70082a4156 100644 --- a/lib/_tls_legacy.js +++ b/lib/_tls_legacy.js @@ -19,6 +19,8 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. +'use strict'; + var assert = require('assert'); var events = require('events'); var stream = require('stream'); @@ -444,9 +446,9 @@ CryptoStream.prototype.destroySoon = function(err) { // was written on this side was read from the other side. var self = this; var waiting = 1; - function finish() { + var finish = function() { if (--waiting === 0) self.destroy(); - } + }; this._opposite.once('end', finish); if (!this._finished) { this.once('finish', finish); |