From 562ec23ec655352f1eb930f6171f9a97e4a35b76 Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Fri, 21 Feb 2025 08:11:10 +0000 Subject: [PATCH] [real-time] ignore error from duplicate send action on socket.io socket (#23787) GitOrigin-RevId: 992a39a5cff04bcc0814ac6a620ad350d6e1da14 --- services/real-time/app.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/services/real-time/app.js b/services/real-time/app.js index 61b3f0cad1..446432d543 100644 --- a/services/real-time/app.js +++ b/services/real-time/app.js @@ -262,7 +262,11 @@ if (Settings.shutdownDrainTimeWindow) { 'EPIPE', 'ECONNRESET', 'ERR_STREAM_WRITE_AFTER_END', - ].includes(error.code) + ].includes(error.code) || + // socket.io error handler sending on polling connection again. + (error.code === 'ERR_HTTP_HEADERS_SENT' && + error.stack && + error.stack.includes('Transport.error')) ) { Metrics.inc('disconnected_write', 1, { status: error.code }) return logger.warn(