From 5be8d5417bea917273c4e42dc8d2253d77946642 Mon Sep 17 00:00:00 2001 From: Iain Olliver Date: Wed, 14 Jul 2021 16:44:16 +0100 Subject: [PATCH] Heartbeat interval should be timeout/2 --- connection.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/connection.go b/connection.go index 9ab2e1c..a967ec4 100644 --- a/connection.go +++ b/connection.go @@ -783,7 +783,7 @@ func (c *Connection) openTune(config Config, auth Authentication) error { // "The client should start sending heartbeats after receiving a // Connection.Tune method" - go c.heartbeater(c.Config.Heartbeat, c.NotifyClose(make(chan *Error, 1))) + go c.heartbeater(c.Config.Heartbeat/2, c.NotifyClose(make(chan *Error, 1))) if err := c.send(&methodFrame{ ChannelId: 0,