From a26dee556d3ae4c583f5495d6273c472f1ad8cbb Mon Sep 17 00:00:00 2001 From: astaxie Date: Thu, 5 Nov 2015 00:19:09 +0800 Subject: [PATCH] fix #1335 --- app.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app.go b/app.go index 4978e5b1..ed57b978 100644 --- a/app.go +++ b/app.go @@ -117,7 +117,7 @@ func (app *App) Run() { server := grace.NewServer(addr, app.Handlers) server.Server.ReadTimeout = app.Server.ReadTimeout server.Server.WriteTimeout = app.Server.WriteTimeout - if ListenTCP4 && HTTPAddr == "" { + if ListenTCP4 { server.Network = "tcp4" } err := server.ListenAndServe() @@ -154,7 +154,7 @@ func (app *App) Run() { go func() { app.Server.Addr = addr BeeLogger.Info("http server Running on %s", app.Server.Addr) - if ListenTCP4 && HTTPAddr == "" { + if ListenTCP4 { ln, err := net.Listen("tcp4", app.Server.Addr) if err != nil { BeeLogger.Critical("ListenAndServe: ", err)