Skip to content

Streams don't seem to emit the close event #72

Closed
@CMCDragonkai

Description

@CMCDragonkai

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

  1. Do the above but with EFS

Expected behavior

Should say:

emitted finish
emitted close

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingr&d:polykey:core activity 1Secret Vault Sharing and Secret History Management

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions