-
Notifications
You must be signed in to change notification settings - Fork 27
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
Calling .leave request when unsubscribing #180
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
case .heartbeatSuccess: | ||
return state is Presence.Heartbeating | ||
case .heartbeatFailed: | ||
return state is Presence.Heartbeating | ||
case .timesUp: | ||
return state is Presence.HeartbeatCooldown | ||
case .leftAll: | ||
return !(state is Presence.HeartbeatInactive) | ||
return true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, we want to transit even if heartbeat loop is not active?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. You're right, the heartbeat loop is inactive if the user subscribes to some channel without Presence. However, we still have to trigger .leave
invocation as a part of the unsubscribe cleanup
@pubnub-release-bot release as 7.3.1 |
🚀 Release successfully completed 🚀 |
fix(presence): calling .leave request in missing cases