We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Repro code:
const retry = require('retry'); const testCase = (configAmmend) => { return new Promise((resolve) => { const op = retry.operation({ retries: 1, minTimeout: 800, factor: 1, ...configAmmend }); const startTime = Date.now(); op.attempt((attempt) => { console.log(`${attempt}: ${Date.now() - startTime}`); op.retry(new Error('fail on purpose')); if (attempt === 2) { resolve(); } }); }); }; const test = async () => { console.log('test 1'); await testCase({}); console.log('test 2'); await testCase({ maxTimeout: 1000 }); console.log('test 3'); await testCase({ maxTimeout: undefined }); } test();
Expected behavior:
test 1 1: 0 2: 809 test 2 1: 0 2: 810 test 3 1: 0 2: 809
Actual behavior:
test 1 1: 0 2: 809 test 2 1: 0 2: 810 test 3 1: 0 2: 15
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Repro code:
Expected behavior:
Actual behavior:
The text was updated successfully, but these errors were encountered: