From 0836b9e13fb1fdf45feadf69d5ab3e5829dcfb18 Mon Sep 17 00:00:00 2001 From: astaxie Date: Fri, 1 Aug 2014 17:03:28 +0800 Subject: [PATCH] fix #718 --- app.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app.go b/app.go index cc7f218e..64bafde8 100644 --- a/app.go +++ b/app.go @@ -69,6 +69,7 @@ func (app *App) Run() { if EnableHttpTLS { go func() { + time.Sleep(20 * time.Microsecond) if HttpsPort != 0 { app.Server.Addr = fmt.Sprintf("%s:%d", HttpAddr, HttpsPort) } @@ -83,6 +84,7 @@ func (app *App) Run() { if EnableHttpListen { go func() { + app.Server.Addr = addr err := app.Server.ListenAndServe() if err != nil { BeeLogger.Critical("ListenAndServe: ", err)