Skip to content

fs: refactor close to use destroy

Rodrigo Muino Tomonari requested to merge github/fork/mcollina/fs-destroy into master

Refactor close() to use destroy() and not vice versa in ReadStream. Avoid races between WriteStream.close and WriteStream.write, by aliasing close to end().

Fixes: https://github.com/nodejs/node/issues/2006

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

fs, stream

Merge request reports

Loading