summaryrefslogtreecommitdiff
path: root/lib/net.js
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2018-11-10 21:03:46 +0100
committerAnna Henningsen <anna@addaleax.net>2018-11-16 10:09:42 +0100
commit8cdb92f11c79de45ed1e7686717bbfc6df304a05 (patch)
tree357dad781f6e8336077469a8541dd9d4e8754887 /lib/net.js
parentb92d55f71811528c38cfdb9ca552502603963360 (diff)
downloadandroid-node-v8-8cdb92f11c79de45ed1e7686717bbfc6df304a05.tar.gz
android-node-v8-8cdb92f11c79de45ed1e7686717bbfc6df304a05.tar.bz2
android-node-v8-8cdb92f11c79de45ed1e7686717bbfc6df304a05.zip
Revert "net: partially revert "simplify Socket.prototype._final""
This reverts commit ac1f56c76a5d1a8ebcb2421d5c629e51df1ac48c. Refs: https://github.com/nodejs/node/pull/24288 Refs: https://github.com/nodejs/node/pull/24075 PR-URL: https://github.com/nodejs/node/pull/24290 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Ouyang Yadong <oyydoibh@gmail.com>
Diffstat (limited to 'lib/net.js')
-rw-r--r--lib/net.js6
1 files changed, 0 insertions, 6 deletions
diff --git a/lib/net.js b/lib/net.js
index dc6312e9d9..08d08888de 100644
--- a/lib/net.js
+++ b/lib/net.js
@@ -350,12 +350,6 @@ Socket.prototype._final = function(cb) {
return this.once('connect', () => this._final(cb));
}
- // TODO(addaleax): This should not be necessary.
- if (!this.readable || this._readableState.ended) {
- cb();
- return this.destroy();
- }
-
if (!this._handle)
return cb();