feat(health): HEALTH_SUCCESS_WAIT_DURATION

This commit is contained in:
Quentin McGaw
2023-05-07 09:35:51 +00:00
parent 7a88a09341
commit b6c8399c3b
5 changed files with 25 additions and 5 deletions

View File

@@ -49,9 +49,8 @@ func (s *Server) runHealthcheckLoop(ctx context.Context, done chan<- struct{}) {
continue
}
// Success, check again in 5 seconds
const period = 5 * time.Second
timer := time.NewTimer(period)
// Success, check again after the success wait duration
timer := time.NewTimer(s.config.SuccessWait)
select {
case <-ctx.Done():
if !timer.Stop() {