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

Node.subscribe called more than once behavior undefined #33

Open
ReidWilliams opened this issue Jan 29, 2017 · 0 comments
Open

Node.subscribe called more than once behavior undefined #33

ReidWilliams opened this issue Jan 29, 2017 · 0 comments
Labels

Comments

@ReidWilliams
Copy link
Contributor

What API behavior do we want whe user code calls Node.subscribe with an already subscribed peer id but a new callback?

Previous implementation had this:

ids.filter((id) => !this.subscriptions.has(id))
  .forEach((id) => {
    this.subscriptionsManager.subscribe(id, handler)
  })
  .forEach((id) => {
    this.subscriptionsManager.subscribe(id, handler)
  })

This appears to ignore a second call to subscribe for the same peer id.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant