From cc681a94f44618b2336b8f175e783f5f7e330ca2 Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Tue, 22 Sep 2020 14:10:23 +0100 Subject: [PATCH] [app] ignore error from writing to disconnected long-polling client --- services/real-time/app.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/services/real-time/app.js b/services/real-time/app.js index 7525ed4d11..9790be8f1d 100644 --- a/services/real-time/app.js +++ b/services/real-time/app.js @@ -220,9 +220,13 @@ if (Settings.shutdownDrainTimeWindow) { process.removeAllListeners('uncaughtException') process.on('uncaughtException', function (error) { if ( - ['ETIMEDOUT', 'EHOSTUNREACH', 'EPIPE', 'ECONNRESET'].includes( - error.code - ) + [ + 'ETIMEDOUT', + 'EHOSTUNREACH', + 'EPIPE', + 'ECONNRESET', + 'ERR_STREAM_WRITE_AFTER_END' + ].includes(error.code) ) { Metrics.inc('disconnected_write', 1, { status: error.code }) return logger.warn(