★ wanayoo — archive 1999 https://github.com/nodejs/node/commit/8ad880f3fcNouvelle recherche | Portail wanayoo
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 authored and targos committed Jul 2, 2019
1 parent cd78c5e commit 8ad880f3fc987c1a5f2045b15bcb5d8963513a97
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 8ad880f

Please sign in to comment.