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

fix: revert defer of context done

This commit is contained in:
Amir Alavi
2023-11-26 14:17:23 -05:00
parent 89f453ebb3
commit 6f0cd50dc0

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