net: replace _writableState.finished with writableFinished
Replace usage of quasi-private _writableState.finished with public writableFinished property. PR-URL: https://github.com/nodejs/node/pull/27974 Refs: https://github.com/nodejs/node/issues/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>
This commit is contained in:
parent
fad3b64350
commit
3832713fa0
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user