summaryrefslogtreecommitdiff
path: root/lib/tls.js
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2013-03-03 16:12:02 -0800
committerisaacs <i@izs.me>2013-03-05 14:26:34 -0800
commit049903e333f843d7587e7c40845a7d51ea5955f8 (patch)
tree05ea71f9dfa6639bef9823c2d39ae5a6751e6988 /lib/tls.js
parente4383c0170832368564bd39ddc5dba6e104eb1b2 (diff)
downloadnodejs-049903e333f843d7587e7c40845a7d51ea5955f8.tar.gz
nodejs-049903e333f843d7587e7c40845a7d51ea5955f8.tar.bz2
nodejs-049903e333f843d7587e7c40845a7d51ea5955f8.zip
stream: Split Writable logic into small functions
1. Get rid of unnecessary 'finishing' flag 2. Dont check both ending and ended. Extraneous. Also: Remove extraneous 'finishing' flag, and don't check both 'ending' and 'ended', since checking just 'ending' is sufficient.
Diffstat (limited to 'lib/tls.js')
-rw-r--r--lib/tls.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tls.js b/lib/tls.js
index bb0a03af2..86ace15b1 100644
--- a/lib/tls.js
+++ b/lib/tls.js
@@ -573,7 +573,7 @@ CryptoStream.prototype.destroySoon = function(err) {
if (this.writable)
this.end();
- if (this._writableState.finishing || this._writableState.finished)
+ if (this._writableState.finished)
this.destroy();
else
this.once('finish', this.destroy);