0836b9e1 by astaxie

fix #718

1 parent 7a39a3c5
Showing 1 changed file with 2 additions and 0 deletions
...@@ -69,6 +69,7 @@ func (app *App) Run() { ...@@ -69,6 +69,7 @@ func (app *App) Run() {
69 69
70 if EnableHttpTLS { 70 if EnableHttpTLS {
71 go func() { 71 go func() {
72 time.Sleep(20 * time.Microsecond)
72 if HttpsPort != 0 { 73 if HttpsPort != 0 {
73 app.Server.Addr = fmt.Sprintf("%s:%d", HttpAddr, HttpsPort) 74 app.Server.Addr = fmt.Sprintf("%s:%d", HttpAddr, HttpsPort)
74 } 75 }
...@@ -83,6 +84,7 @@ func (app *App) Run() { ...@@ -83,6 +84,7 @@ func (app *App) Run() {
83 84
84 if EnableHttpListen { 85 if EnableHttpListen {
85 go func() { 86 go func() {
87 app.Server.Addr = addr
86 err := app.Server.ListenAndServe() 88 err := app.Server.ListenAndServe()
87 if err != nil { 89 if err != nil {
88 BeeLogger.Critical("ListenAndServe: ", err) 90 BeeLogger.Critical("ListenAndServe: ", err)
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!