Open zaverden opened 1 year ago
Thanks for reporting! Would you like to send a Pull Request to address this issue? Remember to add unit tests.
I'll take it :)
I can't find a performant way to do this without cloning data that should be in the previous file
if you want to make sure that until you call reopen all pending writes finish you can listen to drain
According to the docs I can pass a new file path for
reopen
to continue to write into new file.However, if I call
reopen
during async write it ignores new file path (https://github.com/pinojs/sonic-boom/blob/v3.2.0/index.js#L304-L308)Code to reproduce
workaround