1
0
mirror of https://github.com/kubernetes-sigs/descheduler.git synced 2026-01-26 05:14:13 +01:00

Merge pull request #1299 from a7i/amir/revert-defer-done

fix: revert defer of context done
This commit is contained in:
Kubernetes Prow Robot
2023-11-27 13:17:27 +01:00
committed by GitHub

View File

@@ -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