mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
the channel used with signal.Notify should be buffered.
This commit is contained in:
parent
cf54343b50
commit
80430e1ef4
2
neko.go
2
neko.go
@ -175,7 +175,7 @@ func (neko *Neko) ServeCommand(cmd *cobra.Command, args []string) {
|
|||||||
neko.Start()
|
neko.Start()
|
||||||
neko.logger.Info().Msg("neko ready")
|
neko.logger.Info().Msg("neko ready")
|
||||||
|
|
||||||
quit := make(chan os.Signal)
|
quit := make(chan os.Signal, 1)
|
||||||
signal.Notify(quit, os.Interrupt)
|
signal.Notify(quit, os.Interrupt)
|
||||||
sig := <-quit
|
sig := <-quit
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user