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 singular throttle event dispatched two times #3105

Closed

Conversation

SteffenDE
Copy link
Collaborator

Relates to: #3097

So, in #3097 I changed the throttle behavior to also dispatch an event after the throttle time has passed to make sure that the last event is dispatched. However, this caused the event to be dispatched twice in the case that there was only one event in the first place.

This fixes that, although the throttle code is still a bit of a mess and should probably be refactored completely at some point.

Relates to: phoenixframework#3097

So, in phoenixframework#3097 I changed the throttle behavior to also dispatch an event
after the throttle time has passed to make sure that the last event is
dispatched. However, this caused the event to be dispatched twice in the
case that there was only one event in the first place.

This fixes that, although the throttle code is still a bit of a mess and
should probably be refactored completely at some point.
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