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

Remove handler assertion in removeListener #134

Merged
merged 1 commit into from
May 18, 2022
Merged

Conversation

akiroz
Copy link
Contributor

@akiroz akiroz commented May 10, 2022

Qlobber supports removing all listeners from a topic by not passing a specific listener.

Removed handler assertion in removeListener to support this use case.

Copy link
Owner

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add a unit test?

@mcollina
Copy link
Owner

Unfortunately changing the API of this module has a pretty wide reach: all the implementers of the same interface must add its support. It's better if you add a new removeAllListeners method, so it's easier to detect if it's there or not.

@akiroz
Copy link
Contributor Author

akiroz commented May 10, 2022

@mcollina Thanks for the feedback, I have added removeAllListeners instead with tests

Copy link
Owner

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina mcollina merged commit 728605c into mcollina:master May 18, 2022
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