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

fs: avoid emitting error EBADF for double close

Changed the logic in fs.ReadStream and fs.WriteStream so that
close always calls the prototype method rather than the internal
event listener.

Fixes: https://github.com/nodejs/node/issues/2950
PR-URL: https://github.com/nodejs/node/pull/11225


Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarEvan Lucas <evanlucas@me.com>
parent 6dd979e6
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