From 66767edf1276b3ceeb982f7f3ee9bb03c5aa3077 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Sat, 11 Dec 2010 01:21:25 -0800 Subject: [PATCH] Add CryptoStream.destroy() --- lib/tls.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/tls.js b/lib/tls.js index c6e27393a4..474f8011f5 100644 --- a/lib/tls.js +++ b/lib/tls.js @@ -87,6 +87,12 @@ CryptoStream.prototype.end = function(d) { }; +CryptoStream.prototype.destroy = function(err) { + if (this.pair._done) return; + this.pair._destroy(); +}; + + function CleartextStream (pair) { CryptoStream.call(this, pair); }