1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-24 22:20:53 +00:00

Merge pull request #3739 from nuczzz/develop

fix graceful bug: old process didn't exist when graceful restart
This commit is contained in:
Ming Deng 2020-06-23 00:10:53 +08:00 committed by GitHub
commit f5c580a403
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,7 +46,10 @@ func (srv *Server) Serve() (err error) {
log.Println(syscall.Getpid(), srv.ln.Addr(), "Listener closed.")
// wait for Shutdown to return
return <-srv.terminalChan
if shutdownErr := <-srv.terminalChan; shutdownErr != nil {
return shutdownErr
}
return
}
// ListenAndServe listens on the TCP network address srv.Addr and then calls Serve