diff --git a/lib/net.js b/lib/net.js index 6c2bf568758ed6..94b4e2a86cbed0 100644 --- a/lib/net.js +++ b/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);