Skip to content
Permalink
Browse files

net: replace _writableState.finished with writableFinished

Replace usage of quasi-private _writableState.finished with public
writableFinished property.

PR-URL: #27974
Refs: #445
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information...
Trott committed Jun 25, 2019
1 parent fad3b64 commit 3832713fa0c0ce7cda8a19e74cd96be1479f6f1e
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/net.js
@@ -556,7 +556,7 @@ Socket.prototype.destroySoon = function() {
if (this.writable)
this.end();

if (this._writableState.finished)
if (this.writableFinished)
this.destroy();
else
this.once('finish', this.destroy);

0 comments on commit 3832713

Please sign in to comment.
You can’t perform that action at this time.