mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-26 17:53:20 +00:00
Handle ECONNRESET in the same way as EPIPE
This commit is contained in:
parent
7663e9689e
commit
8e45a62e32
1 changed files with 2 additions and 1 deletions
|
@ -141,7 +141,8 @@ if Settings.shutdownDrainTimeWindow?
|
|||
if Settings.errors?.catchUncaughtErrors
|
||||
process.removeAllListeners('uncaughtException')
|
||||
process.on 'uncaughtException', (error) ->
|
||||
if error.code == 'EPIPE'
|
||||
if ['EPIPE', 'ECONNRESET'].includes(error.code)
|
||||
Metrics.inc('disconnected_write')
|
||||
return logger.warn err: error, 'attempted to write to disconnected client'
|
||||
logger.error err: error, 'uncaught exception'
|
||||
if Settings.errors?.shutdownOnUncaughtError
|
||||
|
|
Loading…
Reference in a new issue