Commit 2ae9b698 authored by Andreas Madsen's avatar Andreas Madsen Committed by Ben Noordhuis
Browse files

fs: no end emit after createReadStream.pause()

In case a fd option is given to fs.createReadStream a read will instantly
happen. But in the edge case where fd point to an empty file and .pause()
was executed instantly, the end event would emit since no async wait was
between fs.createReadStream and the file read there emits end.

This is a cherry-pick of commit 1f3e4a76 into the v0.6 branch.
parent 5ff2ae83
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