Skip to content

fix: Add missed events when removing listeners#157

Closed
cwrllab wants to merge 2 commits intopusher:masterfrom
cwrllab:feature/remove-listener
Closed

fix: Add missed events when removing listeners#157
cwrllab wants to merge 2 commits intopusher:masterfrom
cwrllab:feature/remove-listener

Conversation

@cwrllab
Copy link
Copy Markdown

@cwrllab cwrllab commented May 23, 2024

Description

removeAllListeners does not currently remove all listeners.
Added missed event types when removing listeners

CHANGELOG

fix: add missed events when removing listeners

@cwrllab
Copy link
Copy Markdown
Author

cwrllab commented May 29, 2024

@fbenevides @benw-pusher
Hi, could you review this?

Keith-wright pushed a commit that referenced this pull request Mar 16, 2026
PusherChannel.trigger() now accepts an event without channelName,
defaulting to the channel's own name, aligning with the documented API.

removeAllListeners() now correctly removes all 7 event listeners;
ON_CONNECTION_STATE_CHANGE and ON_SUBSCRIPTION_ERROR were previously
not cleared on init() and reset() calls, causing stale listeners to
accumulate. Adds an initial Jest test suite covering both fixes.

Supersedes #23, #157. Closes #167, #182.
@Keith-wright
Copy link
Copy Markdown
Contributor

Closing as the fix proposed here has been incorporated into #188, which was merged with full test coverage. Thanks for the original contribution @changwoolab!

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