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

Disable heartbeats if hearbeat set to 0 #469

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

carlhoerberg
Copy link
Contributor

fixes #467

lib/connection.js Outdated Show resolved Hide resolved
lib/connection.js Outdated Show resolved Hide resolved
@@ -227,7 +227,7 @@ C.open = function(allFields, openCallback0) {
tunedOptions.channelMax =
negotiate(fields.channelMax, allFields.channelMax);
tunedOptions.heartbeat =
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this PR is old and @squaremo has reviewed / suggested a change, but I am thinking this is a simpler, clearer solution.

Suggested change
tunedOptions.heartbeat =
if (allFields.heartbeat !== 0) {
tunedOptions.heartbeat =
negotiate(fields.heartbeat, allFields.heartbeat);
}

This would also facilitate revert of the change @ line 192 above.

Base automatically changed from master to main February 17, 2021 22:01
@kibertoad
Copy link
Collaborator

@carlhoerberg Any chance you could finish this PR?

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.

Make it possible to disable heartbeats
4 participants