Use autodestroy on Transform stream

This commit is contained in:
Simon Detheridge 2020-03-26 15:09:56 +00:00
parent 82599bce67
commit 7e45a82c35

View file

@ -15,6 +15,7 @@ const pipeline = promisify(Stream.pipeline)
// the number of bytes transferred
class ObserverStream extends Stream.Transform {
constructor(options) {
options.autoDestroy = true
super(options)
this.bytes = 0