mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
request restart on unhandled exceptions to avoid memory leak
This commit is contained in:
parent
72ad81887a
commit
c2e50c619d
1 changed files with 2 additions and 0 deletions
|
@ -37,6 +37,8 @@ app.use (req, res, next) ->
|
|||
requestDomain.add req
|
||||
requestDomain.add res
|
||||
requestDomain.on "error", (err)->
|
||||
# request a shutdown to prevent memory leaks
|
||||
appIsOk = false
|
||||
setTimeout(->
|
||||
if !res.headerSent
|
||||
res.send(500)
|
||||
|
|
Loading…
Reference in a new issue