Skip to content

Change client_impl::send_impl() not to delay ping #125

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

Merged
merged 1 commit into from
Feb 24, 2017

Conversation

grahn
Copy link
Contributor

@grahn grahn commented Nov 16, 2016

This fixes an issue where a disconnect can go undetected.

In the case where client_impl::send_impl() continuously gets called with an interval less than client_impl::m_ping_interval, a disconnect due to network connectivity problems is never detected because the ping keeps getting delayed by send_impl(), thus not allowing a pong timeout to happen, which results in client_impl::close_impl() never being called.

client_impl::close_impl() only gets called when the user is closing the
connection ("End by user"), when there is a handshake error, when the
server sends a frame_close packet ("End by server"), or when there is a
pong timeout.

Before, in the case where send_impl() would continously get called with
an interval less than client_impl::m_ping_interval, a disconnect due to
network problems would never be detected because the ping would keep
getting delayed, thus never allowing the pong timeout to happen. This
fixes that by not delaying pings.
@melode11 melode11 merged commit 4d83a7a into socketio:master Feb 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants