Explorar o código

[app] ignore error from writing to disconnected long-polling client

Jakob Ackermann %!s(int64=6) %!d(string=hai) anos
pai
achega
cc681a94f4
Modificáronse 1 ficheiros con 7 adicións e 3 borrados
  1. 7 3
      services/real-time/app.js

+ 7 - 3
services/real-time/app.js

@@ -220,9 +220,13 @@ if (Settings.shutdownDrainTimeWindow) {
     process.removeAllListeners('uncaughtException')
     process.removeAllListeners('uncaughtException')
     process.on('uncaughtException', function (error) {
     process.on('uncaughtException', function (error) {
       if (
       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 })
         Metrics.inc('disconnected_write', 1, { status: error.code })
         return logger.warn(
         return logger.warn(