Просмотр исходного кода

Use autodestroy on Transform stream

Simon Detheridge 6 лет назад
Родитель
Сommit
7e45a82c35
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      services/filestore/app/js/PersistorHelper.js

+ 1 - 0
services/filestore/app/js/PersistorHelper.js

@@ -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