mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 09:09:36 +02:00
Handle ERR_STREAM_UNABLE_TO_PIPE alongside ERR_STREAM_PREMATURE_CLOSE (#31174)
GitOrigin-RevId: bbf49237b177d7a58a9b13efc6f38f5eecfb745c
This commit is contained in:
committed by
Copybot
parent
a591f2eb7a
commit
ee4b5f515c
@@ -68,7 +68,11 @@ 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' ||
|
||||
err.code === 'ERR_STREAM_UNABLE_TO_PIPE')
|
||||
) {
|
||||
res.end()
|
||||
} else if (err) {
|
||||
next(
|
||||
|
||||
Reference in New Issue
Block a user