Commit e5c290be authored by Matteo Collina's avatar Matteo Collina
Browse files

fs: refactor close to use destroy

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
PR-URL: https://github.com/nodejs/node/pull/15407


Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarRefael Ackermann <refack@gmail.com>
Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
parent f27b5e4b
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment