-
Notifications
You must be signed in to change notification settings - Fork 401
Fix Shared Worker state update on presence change and listen for pagehide
#445
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
Conversation
On `pagehide` without `bfcache` client on page will send `terminate` to Shared Worker for early long-poll request termination and `leave` request sending (if configured). fix(presence): fix channels and groups update in Shared worker Fix an issue with the client's state update in Shared Worker caused by `-pnpres` suffixed entries being removed from heartbeat / leave request channels and groups.
| pingTimeouts[event.subscriptionKey] = setTimeout( | ||
| pingTimeouts[subscriptionKey] = setTimeout( | ||
| () => pingClients(subscriptionKey), | ||
| interval * 500 - 1, |
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.
Should this be configurable ? Just like we allow heartbeat timing configuration on the top of presence interval value. Or it doesn't matter!!?
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.
@mohitpubnub interval value or what exactly?
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, should it be configurable or not?
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.
Got it..subscriptionWorkerOfflineClientsCheckInterval should work for it.
mohitpubnub
left a comment
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.
👍🏻
|
@pubnub-release-bot release |
|
🚀 Release successfully completed 🚀 |
feat(shared-worker): early request terminate on
pagehideOn
pagehidewithoutbfcacheclient on page will sendterminateto Shared Worker for early long-poll request termination andleaverequest sending (if configured).fix(presence): fix channels and groups update in Shared worker
Fix an issue with the client's state update in Shared Worker caused by
-pnpressuffixed entries being removed from heartbeat / leave request channels and groups.