diff --git a/lib/tls.js b/lib/tls.js index c6e27393a43..474f8011f5a 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); }