mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Call end() when handing ERR_STREAM_PREMATURE_CLOSE
This commit is contained in:
parent
ae62bb75ca
commit
4cb4d450be
1 changed files with 3 additions and 1 deletions
|
@ -61,7 +61,9 @@ function getFile(req, res, next) {
|
|||
}
|
||||
|
||||
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(
|
||||
new Errors.ReadError({
|
||||
message: 'error transferring stream',
|
||||
|
|
Loading…
Reference in a new issue