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
+1 -1
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