mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 12:00:55 +00:00
Merge pull request #2849 from iclinux/grace-patch
Make parent process exit gracefully.
This commit is contained in:
commit
a30a89e57e
@ -67,7 +67,7 @@ func (srv *Server) ListenAndServe() (err error) {
|
||||
log.Println(err)
|
||||
return err
|
||||
}
|
||||
err = process.Kill()
|
||||
err = process.Signal(syscall.SIGTERM)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@ -122,7 +122,7 @@ func (srv *Server) ListenAndServeTLS(certFile, keyFile string) (err error) {
|
||||
log.Println(err)
|
||||
return err
|
||||
}
|
||||
err = process.Kill()
|
||||
err = process.Signal(syscall.SIGTERM)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user