atomiclabs / atomiclabs/hyperdex

Race condition in fireEvery

Open
#100 0 comments 0 reactions 1 assignee Claimed by @kevva View on GitHub
bug help wanted low priority
Dominant language
JavaScript
Stars
151
Forks
55
PR merge metrics
No merged PRs in 30d

Description

If you call the returned cancel function during the async execution of the callback, the `timeoutId` will reference the current `timeoutId` which has already started, not a future id.

We need to not only clear the `timeoutId` but also flip a local boolean variable and check this before we call `setTimeout` again.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.