mirror of
https://github.com/kubernetes-sigs/descheduler.git
synced 2026-01-26 21:31:18 +01:00
fix: revert defer of context done
This commit is contained in:
@@ -78,7 +78,6 @@ func NewDeschedulerCommand(out io.Writer) *cobra.Command {
|
||||
secureServing.DisableHTTP2 = !s.EnableHTTP2
|
||||
|
||||
ctx, done := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM)
|
||||
defer done()
|
||||
|
||||
pathRecorderMux := mux.NewPathRecorderMux("descheduler")
|
||||
if !s.DisableMetrics {
|
||||
@@ -98,6 +97,7 @@ func NewDeschedulerCommand(out io.Writer) *cobra.Command {
|
||||
return err
|
||||
}
|
||||
|
||||
done()
|
||||
// wait for metrics server to close
|
||||
<-stoppedCh
|
||||
|
||||
|
||||
Reference in New Issue
Block a user