refs #4823 Minor changes

This commit is contained in:
Guillermo Bonet 2023-06-16 14:26:24 +02:00
parent 14b29400a4
commit 9fb16cf344
2 changed files with 5 additions and 4 deletions

View File

@ -26,6 +26,7 @@ TIME_STAMPS = true
#REQUEST CONFIG #REQUEST CONFIG
MS_RETRY_UNHANDLED_ERROR = 900000 MS_RETRY_UNHANDLED_ERROR = 900000
MS_RETRY_LOST_CONNECTION = 900000
#DEV OPTIONS #DEV OPTIONS
ORGS_ALWAYS_CONN = false ORGS_ALWAYS_CONN = false

View File

@ -741,9 +741,9 @@ export async function vnRequest(method, url, data, headers) {
} catch (err) { } catch (err) {
switch (err.code) { switch (err.code) {
case 'ECONNRESET': // Client network socket TLS case 'ECONNRESET': // Client network socket TLS
case 'EAI_AGAIN': // getaddrinfo case 'EAI_AGAIN': // getaddrinfo || Lost connection
await await warnSpin(null, err, false); await warnSpin(null, err, false);
await sleep(1000); await sleep(env.MS_RETRY_LOST_CONNECTION);
break; break;
case 'ECONNABORTED': case 'ECONNABORTED':
case 'ECONNREFUSED': case 'ECONNREFUSED':
@ -778,7 +778,7 @@ export async function vnRequest(method, url, data, headers) {
await sleep(env.MS_RETRY_UNHANDLED_ERROR); await sleep(env.MS_RETRY_UNHANDLED_ERROR);
break; break;
} }
await startSpin(); if (!err?.code === 'EAI_AGAIN') await startSpin();
} }
} }
}; };