mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
[app] ignore errors from accessing disconnected client sockets
Technically `EHOSTUNREACH` and `ETIMEDOUT` should go into a 'disconnected_read' metric. But this would require changes to dashboards and a larger diff.
This commit is contained in:
parent
8f7d846ed9
commit
a0028646a5
1 changed files with 5 additions and 1 deletions
|
@ -181,7 +181,11 @@ if (Settings.shutdownDrainTimeWindow) {
|
|||
if (Settings.errors && Settings.errors.catchUncaughtErrors) {
|
||||
process.removeAllListeners('uncaughtException')
|
||||
process.on('uncaughtException', function (error) {
|
||||
if (['EPIPE', 'ECONNRESET'].includes(error.code)) {
|
||||
if (
|
||||
['ETIMEDOUT', 'EHOSTUNREACH', 'EPIPE', 'ECONNRESET'].includes(
|
||||
error.code
|
||||
)
|
||||
) {
|
||||
Metrics.inc('disconnected_write', 1, { status: error.code })
|
||||
return logger.warn(
|
||||
{ err: error },
|
||||
|
|
Loading…
Reference in a new issue