فهرست منبع

Merge pull request #178 from overleaf/jpa-ignore-broken-socket-errors

[app] ignore errors from accessing disconnected client sockets
Jakob Ackermann 6 سال پیش
والد
کامیت
3505fae253
1فایلهای تغییر یافته به همراه5 افزوده شده و 1 حذف شده
  1. 5 1
      services/real-time/app.js

+ 5 - 1
services/real-time/app.js

@@ -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 },