Closed
Description
Describe the bug
Some testing from #71 show that streams are not emitting the close
event after ending.
Because streams have auto close enabled, after the finish
event, a close
event should be emitted.
s = fs.createWriteStream('./tmp/s');
s.write('abc');
s.write('abc');
s.on('finish', () => { console.log('emitted finish'); });
s.on('close', () => { console.log('emitted close'); });
s.end();
In the above, a regular FS stream does end up emitting the close event.
However in our streams, this is not occurring. Not sure why.
It seems calling destroy()
does not result in a close event.
This may be an upstream readable-stream
bug. But the latest readable-stream
is significantly different. We can try upgrading.
New tests should be written for these streams to check for the close
event.
To Reproduce
- Do the above but with EFS
Expected behavior
Should say:
emitted finish
emitted close