diff --git a/lib/internal/streams/destroy.js b/lib/internal/streams/destroy.js index a5c74e3f158915..170ddb3d14f0b7 100644 --- a/lib/internal/streams/destroy.js +++ b/lib/internal/streams/destroy.js @@ -7,8 +7,6 @@ function destroy(err, cb) { const r = this._readableState; const w = this._writableState; - // TODO(ronag): readable & writable = false? - if (err) { if (w) { w.errored = true; @@ -140,8 +138,6 @@ function errorOrDestroy(stream, err, sync) { const r = stream._readableState; const w = stream._writableState; - // TODO(ronag): readable & writable = false? - if ((r && r.autoDestroy) || (w && w.autoDestroy)) stream.destroy(err); else if (err) {