mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-06 07:39:02 +02:00
Merge pull request #193 from overleaf/jpa-swallow-write-after-end
[app] ignore error from writing to disconnected long-polling client
This commit is contained in:
@@ -220,9 +220,13 @@ if (Settings.shutdownDrainTimeWindow) {
|
||||
process.removeAllListeners('uncaughtException')
|
||||
process.on('uncaughtException', function (error) {
|
||||
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 })
|
||||
return logger.warn(
|
||||
|
||||
Reference in New Issue
Block a user