Skip to content

Fails to deliver topic to all subscribers if one throws (v3.5.0) #4

@georapbox

Description

@georapbox

Consider the following example:

const pubsub = PubSub();

pubsub.subscribe('MY_TOPIC', () => {
  throw new Error('Oooops!!!');
});

pubsub.subscribe('MY_TOPIC', data => {
  console.log('Won\'t enter here');
});

pubsub.publish('MY_TOPIC');

If first subscriber throws, then PubSub fails to deliver the topic to the second subscriber.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions