mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 13:10:54 +00:00
fix #1335
This commit is contained in:
parent
fd4630c6dd
commit
a26dee556d
4
app.go
4
app.go
@ -117,7 +117,7 @@ func (app *App) Run() {
|
|||||||
server := grace.NewServer(addr, app.Handlers)
|
server := grace.NewServer(addr, app.Handlers)
|
||||||
server.Server.ReadTimeout = app.Server.ReadTimeout
|
server.Server.ReadTimeout = app.Server.ReadTimeout
|
||||||
server.Server.WriteTimeout = app.Server.WriteTimeout
|
server.Server.WriteTimeout = app.Server.WriteTimeout
|
||||||
if ListenTCP4 && HTTPAddr == "" {
|
if ListenTCP4 {
|
||||||
server.Network = "tcp4"
|
server.Network = "tcp4"
|
||||||
}
|
}
|
||||||
err := server.ListenAndServe()
|
err := server.ListenAndServe()
|
||||||
@ -154,7 +154,7 @@ func (app *App) Run() {
|
|||||||
go func() {
|
go func() {
|
||||||
app.Server.Addr = addr
|
app.Server.Addr = addr
|
||||||
BeeLogger.Info("http server Running on %s", app.Server.Addr)
|
BeeLogger.Info("http server Running on %s", app.Server.Addr)
|
||||||
if ListenTCP4 && HTTPAddr == "" {
|
if ListenTCP4 {
|
||||||
ln, err := net.Listen("tcp4", app.Server.Addr)
|
ln, err := net.Listen("tcp4", app.Server.Addr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
BeeLogger.Critical("ListenAndServe: ", err)
|
BeeLogger.Critical("ListenAndServe: ", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user