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 <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • 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.