Skip to content

Commit

Permalink
bugfix flike#227
Browse files Browse the repository at this point in the history
  • Loading branch information
flike committed Aug 13, 2016
1 parent 981ff0e commit 09ed716
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
18 changes: 10 additions & 8 deletions cmd/kingshard/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,16 @@ func main() {
)

go func() {
sig := <-sc
if sig == syscall.SIGINT || sig == syscall.SIGTERM || sig == syscall.SIGQUIT {
golog.Info("main", "main", "Got signal", 0, "signal", sig)
golog.GlobalSysLogger.Close()
golog.GlobalSqlLogger.Close()
svr.Close()
} else if sig == syscall.SIGPIPE {
golog.Info("main", "main", "Ignore broken pipe signal", 0)
for {
sig := <-sc
if sig == syscall.SIGINT || sig == syscall.SIGTERM || sig == syscall.SIGQUIT {
golog.Info("main", "main", "Got signal", 0, "signal", sig)
golog.GlobalSysLogger.Close()
golog.GlobalSqlLogger.Close()
svr.Close()
} else if sig == syscall.SIGPIPE {
golog.Info("main", "main", "Ignore broken pipe signal", 0)
}
}
}()

Expand Down
4 changes: 2 additions & 2 deletions core/hack/version.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package hack

const (
Version = "2016-08-13 09:32:54 +0800 @64724c1"
Compile = "2016-08-13 17:12:36 +0800 by go version go1.6 darwin/amd64"
Version = "2016-08-13 17:57:47 +0800 @981ff0e"
Compile = "2016-08-13 19:27:32 +0800 by go version go1.6 darwin/amd64"
)

0 comments on commit 09ed716

Please sign in to comment.