Commit 32f232d3 authored by Girish Ramakrishnan's avatar Girish Ramakrishnan

destroy input stream on error

parent 235047ad
......@@ -632,7 +632,10 @@ function tarExtract(inStream, dataLayout, encryption, callback) {
}
});
const emitError = once((error) => ps.emit('error', error));
const emitError = once((error) => {
inStream.destroy();
ps.emit('error', error);
});
inStream.on('error', function (error) {
debug('tarExtract: input stream error.', error);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment