Skip to content

Commit

Permalink
docs(health): explain why ctx is not used
Browse files Browse the repository at this point in the history
  • Loading branch information
vknabel committed Jul 26, 2024
1 parent 4856de9 commit c073d9d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions healthstatus/async-check.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ func (c *AsyncHealthCheck) ServiceName() string {
func (c *AsyncHealthCheck) Check(context.Context) (HealthResult, error) {
c.log.Debug("checked async")
if c.ticker == nil {
// The context coming in is bound to a single request
// but the ticker should be started in background
c.Start(context.Background()) //nolint:contextcheck
}
return c.current.Status, c.current.Err
Expand Down

0 comments on commit c073d9d

Please sign in to comment.