Fix varinterval panic if request IH is not provided

This commit is contained in:
Širhoe Biazhkovič
2021-11-26 19:21:49 +03:00
committed by Lawrence, Rendall
parent 9122aefdd7
commit 239a642bfc
6 changed files with 13 additions and 13 deletions

View File

@@ -148,7 +148,7 @@ func RootRunCmdFunc(cmd *cobra.Command, _ []string) error {
return err
}
quit := make(chan os.Signal)
quit := make(chan os.Signal, 1)
signal.Notify(quit, syscall.SIGINT, syscall.SIGTERM)
reload := makeReloadChan()
@@ -209,7 +209,7 @@ func RootPreRunCmdFunc(cmd *cobra.Command, _ []string) error {
// RootPostRunCmdFunc handles clean up of any state initialized by command line
// flags.
func RootPostRunCmdFunc(cmd *cobra.Command, args []string) error {
func RootPostRunCmdFunc(_ *cobra.Command, _ []string) error {
return nil
}

View File

@@ -10,7 +10,7 @@ import (
)
func makeReloadChan() <-chan os.Signal {
reload := make(chan os.Signal)
reload := make(chan os.Signal, 1)
signal.Notify(reload, syscall.SIGUSR1)
return reload
}