瀏覽代碼

Merge pull request #92 from overleaf/spd-no-fatal-epipe

Don't shut down on uncaught EPIPE
Simon Detheridge 6 年之前
父節點
當前提交
3e1cffb8a9
共有 1 個文件被更改,包括 2 次插入 和 0 次删除
  1. 2 0
      services/real-time/app.coffee

+ 2 - 0
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')