Hacker News new | ask | show | jobs
by _panva 1206 days ago
Hi, @panva here. I've previously had Erwin effectively propose the existing code (not the one from the linked article, the one that's in the library today https://github.com/panva/jose/blob/v4.13.0/src/jwks/remote.t...) acknowledging that there is an even more unlikely edge case.

Well, someone was bound to hit that second edge case.

But please help me out on this, the code does not await the _pendingFetch promise and neither does it touch any runtime globals.

So what gives? Please reach out on the cloudflare discord PanvA#6705.

1 comments

The code will usually work, but it's possible that the request which initializes `_pendingFetch` gets canceled before the fetch completes, in which case all other requests will loop forever waiting for it.