Skip to content

Commit 708d539

Browse files
start healhprobes sync
Co-authored-by: Stefan Büringer <buringerst@vmware.com>
1 parent b6a5752 commit 708d539

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

pkg/manager/internal.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -425,11 +425,13 @@ func (cm *controllerManager) serveHealthProbes() {
425425
cm.healthzStarted = true
426426
}()
427427

428-
// Shutdown the server when stop is closed
429-
<-cm.internalProceduresStop
430-
if err := server.Shutdown(cm.shutdownCtx); err != nil {
431-
cm.errChan <- err
432-
}
428+
go func() {
429+
// Shutdown the server when stop is closed
430+
<-cm.internalProceduresStop
431+
if err := server.Shutdown(cm.shutdownCtx); err != nil {
432+
cm.errChan <- err
433+
}
434+
}()
433435
}
434436

435437
func (cm *controllerManager) Start(ctx context.Context) (err error) {
@@ -473,7 +475,7 @@ func (cm *controllerManager) Start(ctx context.Context) (err error) {
473475

474476
// Serve health probes
475477
if cm.healthProbeListener != nil {
476-
go cm.serveHealthProbes()
478+
cm.serveHealthProbes()
477479
}
478480

479481
// Webhooks MUST start before any cache is populated, otherwise there is a race condition

0 commit comments

Comments
 (0)