mirror of
https://github.com/sot-tech/mochi.git
synced 2026-05-29 20:29:27 -07:00
Fix varinterval panic if request IH is not provided
This commit is contained in:
committed by
Lawrence, Rendall
parent
9122aefdd7
commit
239a642bfc
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user