Skip to content
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

Add client.onHeartbeatTimeout hook #243

Merged
merged 1 commit into from May 3, 2018
Merged

Add client.onHeartbeatTimeout hook #243

merged 1 commit into from May 3, 2018

Conversation

@mtharrison
Copy link
Member

mtharrison commented May 2, 2018

This hook notifies user immediately when a disconnection is initiated due to heartbeat timeout, so they can take action. Previously the only option was to wait for onDisconnection which isn't called until server close frame is received. This leaves a gap between the timeout and disconnection proper when the client is unaware that the connection is not usable.

In future we may make more radical changes to the hooks, such as calling onDisconnect() as soon as the timeout occurs but this is a simple backwards-compatible change that addresses the issue.

Closes #241

cc @dominykas

@mtharrison mtharrison added the feature label May 2, 2018
@mtharrison mtharrison added this to the 8.1.0 milestone May 3, 2018
@mtharrison mtharrison self-assigned this May 3, 2018
@mtharrison mtharrison merged commit 6f69a07 into master May 3, 2018
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@mtharrison mtharrison deleted the on-hb-timeout branch May 3, 2018
@dominykas

This comment has been minimized.

Copy link
Contributor

dominykas commented May 3, 2018

Thanks. I suppose this closes #240 too?

@mtharrison

This comment has been minimized.

Copy link
Member Author

mtharrison commented May 4, 2018

Yes, I referenced the PR by mistake. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.