🐛 Duplex ➡ PassThrough

This commit is contained in:
C-3PO 2018-07-05 21:39:16 +02:00
parent 1c91b51686
commit 099fecce98
Signed by: c3po
GPG key ID: 62993C4BB4D86F24

View file

@ -23,7 +23,7 @@ export default function getFileFromDisks(disks: string[], { diskStart, offset, s
let totalRead = 0; let totalRead = 0;
//Create new stream that concatenates disks until storedSize is reached, then ends the stream. //Create new stream that concatenates disks until storedSize is reached, then ends the stream.
const outputStream = new stream.Duplex({ const outputStream = new stream.PassThrough({
/*read(num) { /*read(num) {
if (num === undefined) { if (num === undefined) {
throw new Error('Expected to receive number of bytes when reading from stream.'); throw new Error('Expected to receive number of bytes when reading from stream.');