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
MS_RETRY_UNHANDLED_ERROR = 900000
MS_RETRY_LOST_CONNECTION = 900000
#DEV OPTIONS
ORGS_ALWAYS_CONN = false

View File

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