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: Listeners not honoring multiple failures for subscription #230

Open
wants to merge 2 commits into
base: next
Choose a base branch
from

Conversation

parag-pv
Copy link
Contributor

Problem:

If a call fails when subscribing, the caller will get an error back.
However if they call again, then the caller will see success despite the listener never actually getting set.

First attempt:

PR #202 - Due to a race condition, the listenerId of a subsequent subscription was dropped.

Updated fix:

Replace promise.all with reduce method to fix race condition and local variable for storing listenerId

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.

2 participants