mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 06:03:45 +01:00
request restart on unhandled exceptions to avoid memory leak
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user