Skip to content

Commit

Permalink
extra heartbeat logging
Browse files Browse the repository at this point in the history
  • Loading branch information
tpetr committed Aug 14, 2023
1 parent cb16379 commit d16917b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/heartbeat.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ func (config *HeartbeatConfig) Start(tnet *netstack.Net, userAgent string) (func
}
}

log.WithField("first_heartbeat_must_succeed", config.FirstHeartbeatMustSucceed).Info("heartbeat.start")
success := execute()
if config.FirstHeartbeatMustSucceed && !success {
return nil, fmt.Errorf("first heartbeat did not succeed")
Expand All @@ -60,6 +61,7 @@ func (config *HeartbeatConfig) Start(tnet *netstack.Net, userAgent string) (func
for {
select {
case <-done:
log.Info("heartbeat.shutdown")
return
case <-ticker.C:
execute()
Expand Down

0 comments on commit d16917b

Please sign in to comment.