|
@@ -61,7 +61,9 @@ function getFile(req, res, next) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
pipeline(fileStream, res, err => {
|
|
pipeline(fileStream, res, err => {
|
|
|
- if (err && err.code !== 'ERR_STREAM_PREMATURE_CLOSE') {
|
|
|
|
|
|
|
+ if (err && err.code === 'ERR_STREAM_PREMATURE_CLOSE') {
|
|
|
|
|
+ res.end()
|
|
|
|
|
+ } else if (err) {
|
|
|
next(
|
|
next(
|
|
|
new Errors.ReadError({
|
|
new Errors.ReadError({
|
|
|
message: 'error transferring stream',
|
|
message: 'error transferring stream',
|