mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 13:10:54 +00:00
fix graceful bug
This commit is contained in:
parent
5620608418
commit
32cd76396d
@ -46,7 +46,10 @@ func (srv *Server) Serve() (err error) {
|
|||||||
|
|
||||||
log.Println(syscall.Getpid(), srv.ln.Addr(), "Listener closed.")
|
log.Println(syscall.Getpid(), srv.ln.Addr(), "Listener closed.")
|
||||||
// wait for Shutdown to return
|
// 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
|
// ListenAndServe listens on the TCP network address srv.Addr and then calls Serve
|
||||||
|
Loading…
Reference in New Issue
Block a user