Skip to content

Commit

Permalink
Merge pull request #5 from ifo20/fix-heartbeat-interval
Browse files Browse the repository at this point in the history
Heartbeat interval should be timeout/2
  • Loading branch information
michaelklishin authored Jul 14, 2021
2 parents c85c116 + 5be8d54 commit de74e8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit de74e8a

Please sign in to comment.