Skip to content

Commit

Permalink
feat: introduce timeout in cluster status check
Browse files Browse the repository at this point in the history
  • Loading branch information
im-adithya committed Oct 3, 2023
1 parent d2d9b03 commit 0d11c9a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lnd/lnd_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ func (cluster *LNDCluster) StartLivenessLoop(ctx context.Context) {
case <-ctx.Done():
return
case <-ticker.C:
cluster.Logger.Info("Checking cluster status")
cluster.checkClusterStatus(ctx)
cluster.Logger.Info("Checking cluster status")
checkCtx, cancel := context.WithTimeout(ctx, 30*time.Second)
defer cancel()
cluster.checkClusterStatus(checkCtx)
}
}
}
Expand Down

0 comments on commit 0d11c9a

Please sign in to comment.