fix(cloudflare): Use original waitUntil to not create a deadlock#21197
fix(cloudflare): Use original waitUntil to not create a deadlock#21197JPeer264 wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 6da5af9. Configure here.
|
|
||
| type FlushLockRegistry = { | ||
| readonly locks: Set<FlushLockInternal>; | ||
| readonly originalWaitUntil: ExecutionContext['waitUntil']; |
There was a problem hiding this comment.
Unused originalWaitUntil field on FlushLockRegistry
Low Severity
The new originalWaitUntil field on FlushLockRegistry is stored in the registry object but never read from it — only registry.locks is ever accessed. The actual original-waitUntil lookup goes through the separate originalWaitUntilMap WeakMap. This makes the field dead code, storing a redundant reference that adds confusion about which mechanism is authoritative for retrieving the original function.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 6da5af9. Configure here.
size-limit report 📦
|


follow up to: #21156
This prevents a deadlock in the
waitUntil, which happened in the sentry-mcp: