Skip to content

Conversation

@parfeon
Copy link
Contributor

@parfeon parfeon commented Mar 23, 2025

fix(shared-worker): fix heartbeat cached channels and groups

Fix issue because of which channels and groups aggregated inside PubNub client state objects and didn't clean up properly on unsubscribe / invalidate.

Fix issue because of which channels and groups aggregated inside PubNub client state objects and
didn't clean up properly on unsubscribe / invalidate.
@parfeon parfeon added status: done This issue is considered resolved. priority: high This PR should be reviewed ASAP. type: fix This PR contains fixes to existing features. labels Mar 23, 2025
@parfeon parfeon self-assigned this Mar 23, 2025
Copy link
Contributor

@mohitpubnub mohitpubnub left a comment

Choose a reason for hiding this comment

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

LGTM!

Refactor how subscription set updated with additional / removal other subscriptions and sets.
@parfeon parfeon requested a review from mohitpubnub March 24, 2025 20:56
const aggregatedListener = this.aggregatedListener;
this.removeListener(this.aggregatedListener);
this.addListener(aggregatedListener);
if (aggregatedListener)
Copy link
Contributor

Choose a reason for hiding this comment

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

Great to see this optimisation for updating listeners. Looks more readable and understandable than previous complex logic of finding the entity names to be removed. 👍🏻

@parfeon
Copy link
Contributor Author

parfeon commented Mar 25, 2025

@pubnub-release-bot release

@parfeon parfeon merged commit c51bb05 into master Mar 25, 2025
6 of 7 checks passed
@parfeon parfeon deleted the fix/heartbeat-aggregated-cache branch March 25, 2025 11:24
@pubnub-release-bot
Copy link
Contributor

🚀 Release successfully completed 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: high This PR should be reviewed ASAP. status: done This issue is considered resolved. type: fix This PR contains fixes to existing features.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants