Skip to content

Commit

Permalink
add additional heartbeat timeout check
Browse files Browse the repository at this point in the history
  • Loading branch information
seletskiy committed Jun 10, 2016
1 parent 412b4ea commit 9bf6d3c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -585,8 +585,13 @@ func connectAndLock(

debugf(`global lock acquired on %d nodes`, len(cluster.nodes))

// err already checked in the timeouts.go
heartbeatMilliseconds, _ := strconv.Atoi(sendTimeout)
heartbeatMilliseconds, err := strconv.Atoi(sendTimeout)
if err != nil {
return hierr.Errorf(
err,
`can't use --send-timeout as heartbeat timeout`,
)
}

cluster.runHeartbeats(
time.Duration(
Expand Down

0 comments on commit 9bf6d3c

Please sign in to comment.