Last 12 weeks · 0 commits
4 of 6 standards met
Repository: sindresorhus/p-retry. Description: Retry a promise-returning or async function Stars: 990, Forks: 77. Primary language: JavaScript. Languages: JavaScript (97.3%), TypeScript (2.7%). License: MIT. Latest release: v7.1.1 (2mo ago). Open PRs: 0, open issues: 2. Last activity: 2mo ago. Community health: 85%. Top contributors: sindresorhus, BendingBender, timkelty, vonovak, pukuba, Richienb, peterj35, petetnt, oreporan, omril1 and others.
We are huge fans of ! We're using it in a bunch of places in our codebase and we found something we think may be a bug. Here is a minimal repro that mimics our code: When the AbortSignal is aborted we expected the retry loop to immediately stop and print "finally". However what we see with this code is that the "finally" isn't printed until after the retry timeout expires. For now we can workaround the issue with code like this: One possible fix would be to add code like this around line 144: