Skip to content

Commit

Permalink
set default execution period to avoid panic
Browse files Browse the repository at this point in the history
  • Loading branch information
dmarkhas committed Jun 8, 2021
1 parent 90f9fe5 commit 3e94174
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion options.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func WithHealthListeners(listener ...HealthListener) HealthOption {
// This is a simple placeholder for any future defaults
func WithDefaults() HealthOption {
return healthOptionFunc(func(h *health) {
if h.defaultExecutionPeriod == 0 {
if h.defaultExecutionPeriod <= 0 {
h.defaultExecutionPeriod = 1 * time.Minute
}
})
Expand Down

0 comments on commit 3e94174

Please sign in to comment.