Skip to content

Disable heartbeats if hearbeat set to 0#469

Closed
carlhoerberg wants to merge 3 commits into
amqp-node:mainfrom
carlhoerberg:disable-heartbeat
Closed

Disable heartbeats if hearbeat set to 0#469
carlhoerberg wants to merge 3 commits into
amqp-node:mainfrom
carlhoerberg:disable-heartbeat

Conversation

@carlhoerberg
Copy link
Copy Markdown
Contributor

fixes #467

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

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
Copy Markdown
Collaborator

@carlhoerberg Any chance you could finish this PR?

@cressie176
Copy link
Copy Markdown
Collaborator

Implemented via #853

@cressie176 cressie176 closed this May 10, 2026
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

5 participants