Skip to content

Commit

Permalink
Merge pull request beego#3739 from nuczzz/develop
Browse files Browse the repository at this point in the history
fix graceful bug: old process didn't exist when graceful restart
  • Loading branch information
flycash authored Jun 22, 2020
2 parents 7210dc2 + 32cd763 commit f5c580a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion grace/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f5c580a

Please sign in to comment.