1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-02-13 13:48:51 +02:00

refine code

This commit is contained in:
HAOYUatHZ 2019-07-25 14:18:52 +08:00
parent 09224ec67c
commit 3bc3731f7d

View File

@ -142,8 +142,7 @@ func main() {
httpSrv := http.New(svc)
c := make(chan os.Signal, 1)
signal.Notify(c, syscall.SIGHUP, syscall.SIGQUIT, syscall.SIGTERM, syscall.SIGINT)
for {
s := <-c
for s := range c {
log.Info("get a signal %s", s.String())
switch s {
case syscall.SIGQUIT, syscall.SIGTERM, syscall.SIGINT: