Handle ECONNRESET as a temporary error

This commit is contained in:
Samuel Elliott 2023-01-16 21:37:45 +00:00
parent f658befb3b
commit 5c6f106b78
No known key found for this signature in database
GPG Key ID: 8420C7CDE43DC4D6

View File

@ -202,6 +202,10 @@ export async function handleError(
} else if ('code' in err && (err as any).type === 'system' && err.code === 'EAI_AGAIN') {
debug('Request error - name resolution failed, waiting %ds before retrying', loop.update_interval, err);
return LoopResult.OK;
} else if ('code' in err && (err as any).type === 'system' && err.code === 'ECONNRESET') {
debug('Request error - connection reset, waiting %ds before retrying', loop.update_interval, err);
return LoopResult.OK;
} else {
throw err;