From fbff3fe72720c79d79ab99999704112159d26a5d Mon Sep 17 00:00:00 2001 From: Simon Detheridge Date: Tue, 4 Feb 2020 12:56:43 +0000 Subject: [PATCH] Don't shut down on uncaught EPIPE --- services/real-time/app.coffee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/real-time/app.coffee b/services/real-time/app.coffee index 074d384665..1aeaec4718 100644 --- a/services/real-time/app.coffee +++ b/services/real-time/app.coffee @@ -141,6 +141,8 @@ if Settings.shutdownDrainTimeWindow? if Settings.errors?.catchUncaughtErrors process.removeAllListeners('uncaughtException') process.on 'uncaughtException', (error) -> + if error.code == 'EPIPE' + return logger.warn err: error, 'attempted to write to disconnected client' logger.error err: error, 'uncaught exception' if Settings.errors?.shutdownOnUncaughtError drainAndShutdown('SIGABRT')