the channel used with signal.Notify should be buffered.

This commit is contained in:
Miroslav Šedivý 2020-10-28 20:43:26 +01:00
parent cf54343b50
commit 80430e1ef4

View File

@ -175,7 +175,7 @@ func (neko *Neko) ServeCommand(cmd *cobra.Command, args []string) {
neko.Start()
neko.logger.Info().Msg("neko ready")
quit := make(chan os.Signal)
quit := make(chan os.Signal, 1)
signal.Notify(quit, os.Interrupt)
sig := <-quit