mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-03 11:22:45 +02:00
zero/health-checks: fix early checks sometimes missing (#5229)
* zero/health-checks: fix early checks sometimes missing * rm closure * fix test
This commit is contained in:
parent
6591e3f539
commit
6e766233c7
5 changed files with 109 additions and 80 deletions
|
@ -73,12 +73,14 @@ func (srv *Telemetry) Run(ctx context.Context) error {
|
|||
})
|
||||
|
||||
eg, ctx := errgroup.WithContext(ctx)
|
||||
eg.Go(func() error { return srv.reporter.Run(ctx) })
|
||||
eg.Go(func() error { return srv.handleRequests(ctx) })
|
||||
eg.Go(func() error {
|
||||
health.SetProvider(srv.reporter)
|
||||
defer health.SetProvider(nil)
|
||||
return srv.reporter.Run(ctx)
|
||||
<-ctx.Done()
|
||||
health.SetProvider(nil)
|
||||
return nil
|
||||
})
|
||||
eg.Go(func() error { return srv.handleRequests(ctx) })
|
||||
return eg.Wait()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue