stream: finished should invoke callback for closed streams
Previously finished(stream, cb) would not invoke the callback for streams that have already finished, ended or errored before being passed to finished(stream, cb).
Ref: https://github.com/nodejs/node/pull/31508 Ref: https://github.com/nodejs/node/pull/31314#issuecomment-578397279
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines