Merge pull request #12938 from overleaf/jpa-leaks-filestore

[filestore] cacheWarm: destroy file stream when not piping into response

GitOrigin-RevId: a0fb14e5ececd28d8d9dbed8cd3a5622c81b8230
This commit is contained in:
Jakob Ackermann
2023-05-09 08:04:18 +00:00
committed by Copybot
parent 51af6558cc
commit 3428d53afe
3 changed files with 12 additions and 1 deletions
@@ -67,6 +67,7 @@ function getFile(req, res, next) {
}
if (req.query.cacheWarm) {
fileStream.destroy()
return res.sendStatus(200).end()
}