Skip to content
New issue

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

fix: check whether tick has been removed before execution of liveQuery subscription #991

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Michiel87
Copy link
Contributor

There might be a problem with the timing of unsubscription and the execution of the debounced function. If the unsubscribe function is called at a moment when the debounced function has already been scheduled to be executed but hasn't yet executed, it won't stop the function from executing.

This is due to the fact that the execute function is only canceled by cancelTick which is removing it from ticks, but it doesn't actually stop it if it's already been scheduled.

I've added a condition to account for this.

@Michiel87 Michiel87 changed the title fix: check whether tick has been removed before execution of function fix: check whether tick has been removed before execution of liveQuery subscription Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant