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

Automatically send heartbeat requests (ping) unless given "?ping=0" #39

Merged
merged 2 commits into from
May 30, 2018

Conversation

clue
Copy link
Owner

@clue clue commented May 30, 2018

The automatic "pong" mechanism allows the Quassel core to detect the connection
to the client is still active. However, it does not allow the client to detect
if the connection to the Quassel core is still active. Because of this, this
project will automatically send a "ping" (heartbeat request) message to the
Quassel core if it did not receive any messages for 60s by default. If no
message has been received after waiting for another period, the connection is
assumed to be dead and will be closed. You can pass the ?ping=120.0 parameter
to change this default interval. The Quassel core uses a configurable ping
interval of 30s by default and also sends all IRC network state changes to the
client, so this mechanism should only really kick in if the connection looks
dead. If you do not want this and want to handle outgoing heartbeat request
messages yourself, you may pass the optional ?ping=0 parameter like this:

$factory->createClient('quassel://localhost?ping=0');

This is technically a BC break because consumers of this package would need to handle this manually previously and switching to this new behavior means that this consumer code may now send duplicate heartbeat requests. In practical terms, adjusting this is rather straight-forward and this makes consuming this library easier for most common use cases.

Builds on top of #38

@clue clue added this to the v0.7.0 milestone May 30, 2018
@clue clue merged commit f1b2120 into clue:master May 30, 2018
@clue clue deleted the ping branch May 30, 2018 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant