From 3d3b4397a51fe492a290c85e431e6bc9307d0a77 Mon Sep 17 00:00:00 2001 From: guillermo Date: Mon, 9 Sep 2024 08:38:13 +0200 Subject: [PATCH] refs #5368 Added new code errors to retry conn --- print-server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/print-server.js b/print-server.js index 8b7f6fd..4454240 100644 --- a/print-server.js +++ b/print-server.js @@ -101,7 +101,7 @@ class PrintServer { this.errorHandler(err); } errorHandler(err) { - if (err.code === 'ETIMEDOUT') { + if (['ETIMEDOUT', 'ECONNRESET', 'PROTOCOL_CONNECTION_LOST'].includes(err.code)) { if (!this.dbDown) { this.dbDown = true; this.serverLog('error', `DB connection lost: ${err.message}`);