Skip to content

Commit

Permalink
Fix signal handling for non-leader processes (kubeflow#1680)
Browse files Browse the repository at this point in the history
antonipp authored and ImpSy committed Jul 31, 2023

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
1 parent bc88547 commit 52211a4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
@@ -240,7 +240,11 @@ func main() {

if *enableLeaderElection {
glog.Info("Waiting to be elected leader before starting application controller goroutines")
<-startCh
select {
case <-signalCh:
os.Exit(0)
case <-startCh:
}
}

glog.Info("Starting application controller goroutines")

0 comments on commit 52211a4

Please sign in to comment.