1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-25 17:00:54 +00:00

Merge pull request #2849 from iclinux/grace-patch

Make parent process exit gracefully.
This commit is contained in:
astaxie 2017-11-19 11:09:13 +08:00 committed by GitHub
commit a30a89e57e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -67,7 +67,7 @@ func (srv *Server) ListenAndServe() (err error) {
log.Println(err) log.Println(err)
return err return err
} }
err = process.Kill() err = process.Signal(syscall.SIGTERM)
if err != nil { if err != nil {
return err return err
} }
@ -122,7 +122,7 @@ func (srv *Server) ListenAndServeTLS(certFile, keyFile string) (err error) {
log.Println(err) log.Println(err)
return err return err
} }
err = process.Kill() err = process.Signal(syscall.SIGTERM)
if err != nil { if err != nil {
return err return err
} }