I work with NodeJS Transform
stream that reads data from a Readable
flow stream then converts it.
When I destroy the Transform stream sometimes I get an error because the destroy function unpipes the Transfrom stream itself but do this async and if it's not quick enough the Readable stream pushes some new data during the disposing, that causing the following error:
Uncaught Error: write after end
Do I do something wrong, you write your code like unpipe before destroying, or how should I make sure the readable does not push data after I called the destroying and do not get any error?