Skip to content

Node.subscribe called more than once behavior undefined #33

@ReidWilliams

Description

@ReidWilliams

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions