Skip to content

Commit

Permalink
net: replace _writableState.finished with writableFinished
Browse files Browse the repository at this point in the history
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 authored and targos committed Jul 2, 2019
1 parent cd78c5e commit 8ad880f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/net.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8ad880f

Please sign in to comment.