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
Contributor

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 New functionality or improvement 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
@mtharrison mtharrison deleted the on-hb-timeout branch May 3, 2018 05:52
@dominykas
Copy link
Contributor

Thanks. I suppose this closes #240 too?

@mtharrison
Copy link
Contributor Author

Yes, I referenced the PR by mistake. Thanks.

@lock
Copy link

lock bot commented Jan 9, 2020

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature New functionality or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants