Skip to content

fix: wait for unsub before deleting local channel #88

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

Merged
merged 1 commit into from
May 17, 2023
Merged

fix: wait for unsub before deleting local channel #88

merged 1 commit into from
May 17, 2023

Conversation

ekrembk
Copy link
Contributor

@ekrembk ekrembk commented Apr 15, 2023

Description

Local channels map is updated before awaiting actual sub/unsub. It becomes a problem with unsubscriptions. The channel is deleted from local map before actually unsubscribing. If a new message is received between unsub is triggered and unsub finishes, it throws an error. Because this.channels.get('channel') is undefined during that period.

This is solving the same issue mentioned in #87

CHANGELOG

  • [CHANGED] Reordered removing channel from local channels map and waiting for native side to do unsubscribing.

@hazhayder
Copy link

Any ETA how long this will take?

@fbenevides fbenevides merged commit ef09875 into pusher:master May 17, 2023
@ekrembk ekrembk deleted the fix/undefined-channels-while-unsubbing branch May 28, 2023 19:49
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.

3 participants