-
Notifications
You must be signed in to change notification settings - Fork 401
Add ability to opt-out smart heartbeat #440
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
Add `useSmartHeartbeat` configuration option which allows ignoring implicit heartbeat (with successful subscribe response) and keep sending `heartbeat` calls with fixed intervals. feat(shared-worker): configurable offline detection interval `subscriptionWorkerOfflineClientsCheckInterval` configuration option can be used to configure the interval at which “offline” PubNub clients (when tab closed) detection will be done. feat(shared-worker): configurable unsubscribe for offline clients `subscriptionWorkerUnsubscribeOfflineClients` configuration option can be used to force unsubscribe (presence leave) for “offline” PubNub clients (when tab closed). refactor(shared-worker): debug output on request completion When `subscriptionWorkerLogVerbosity` is set, there will be additional output to the page console with information about which clients will be notified about request completion.
| return true; | ||
| } catch (error) {} | ||
| } catch (error) { | ||
| if (client.workerLogVerbosity) console.error(`[SharedWorker] Unable send message using message port: ${error}`); |
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.
nitpicking may be. Is it typo in log message for message port instead messagepost?
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 no, it is the way how I wrote MessagePort type. I don't think that it is that bad in this form :)
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 far LGTM
|
@pubnub-release-bot release |
|
🚀 Release successfully completed 🚀 |
feat(heartbeat): add ability to opt-out smart heartbeat
Add
useSmartHeartbeatconfiguration option which allows ignoring implicit heartbeat (with successful subscribe response) and keep sendingheartbeatcalls with fixed intervals.feat(shared-worker): configurable offline detection interval
subscriptionWorkerOfflineClientsCheckIntervalconfiguration option can be used to configure the interval at which “offline” PubNub clients (when tab closed) detection will be done.feat(shared-worker): configurable unsubscribe for offline clients
subscriptionWorkerUnsubscribeOfflineClientsconfiguration option can be used to force unsubscribe(presence leave) for “offline” PubNub clients (when tab closed).
refactor(shared-worker): debug output on request completion
When
subscriptionWorkerLogVerbosityis set, there will be additional output to the page consolewith information about which clients will be notified about request completion.