mirror of
https://github.com/astaxie/beego.git
synced 2024-11-23 02:10:57 +00:00
fix #718
This commit is contained in:
parent
7a39a3c52f
commit
0836b9e13f
2
app.go
2
app.go
@ -69,6 +69,7 @@ func (app *App) Run() {
|
|||||||
|
|
||||||
if EnableHttpTLS {
|
if EnableHttpTLS {
|
||||||
go func() {
|
go func() {
|
||||||
|
time.Sleep(20 * time.Microsecond)
|
||||||
if HttpsPort != 0 {
|
if HttpsPort != 0 {
|
||||||
app.Server.Addr = fmt.Sprintf("%s:%d", HttpAddr, HttpsPort)
|
app.Server.Addr = fmt.Sprintf("%s:%d", HttpAddr, HttpsPort)
|
||||||
}
|
}
|
||||||
@ -83,6 +84,7 @@ func (app *App) Run() {
|
|||||||
|
|
||||||
if EnableHttpListen {
|
if EnableHttpListen {
|
||||||
go func() {
|
go func() {
|
||||||
|
app.Server.Addr = addr
|
||||||
err := app.Server.ListenAndServe()
|
err := app.Server.ListenAndServe()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
BeeLogger.Critical("ListenAndServe: ", err)
|
BeeLogger.Critical("ListenAndServe: ", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user