Merge pull request #4979 from flycash/dev
fix 4975: graceful server listen the specific address
This commit is contained in:
commit
af271bcc6e
@ -1,5 +1,6 @@
|
||||
# developing
|
||||
- [Fix issue 4961, `leafInfo.match()` use `path.join()` to deal with `wildcardValues`, which may lead to cross directory risk ](https://github.com/beego/beego/pull/4964)
|
||||
- [Fix 4975: graceful server listen the specific address](https://github.com/beego/beego/pull/4979)
|
||||
# v2.0.3
|
||||
- [upgrade redisgo to v1.8.8](https://github.com/beego/beego/pull/4872)
|
||||
- [fix prometheus CVE-2022-21698](https://github.com/beego/beego/pull/4878)
|
||||
|
||||
@ -169,7 +169,6 @@ func (srv *Server) ServeTLS(ln net.Listener) error {
|
||||
}
|
||||
|
||||
go srv.handleSignals()
|
||||
log.Println(os.Getpid(), srv.Addr)
|
||||
return srv.internalServe(ln)
|
||||
}
|
||||
|
||||
|
||||
@ -215,7 +215,8 @@ func (app *HttpServer) Run(addr string, mws ...MiddleWare) {
|
||||
if app.Cfg.Listen.ListenTCP4 {
|
||||
server.Network = "tcp4"
|
||||
}
|
||||
ln, err := net.Listen(server.Network, app.Server.Addr)
|
||||
ln, err := net.Listen(server.Network, server.Addr)
|
||||
logs.Info("graceful http server Running on http://%s", server.Addr)
|
||||
if err != nil {
|
||||
logs.Critical("Listen for HTTP[graceful mode]: ", err)
|
||||
endRunning <- true
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user