mirror of
https://github.com/astaxie/beego.git
synced 2024-12-22 19:50:49 +00:00
fix #978
This commit is contained in:
parent
e938876c4a
commit
f96a6285bf
7
app.go
7
app.go
@ -19,7 +19,10 @@ import (
|
||||
"net"
|
||||
"net/http"
|
||||
"net/http/fcgi"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/astaxie/beego/utils"
|
||||
)
|
||||
|
||||
// App defines beego application with a new PatternServeMux.
|
||||
@ -59,6 +62,10 @@ func (app *App) Run() {
|
||||
}
|
||||
} else {
|
||||
if HttpPort == 0 {
|
||||
// remove the Socket file before start
|
||||
if utils.FileExists(addr) {
|
||||
os.Remove(addr)
|
||||
}
|
||||
l, err = net.Listen("unix", addr)
|
||||
} else {
|
||||
l, err = net.Listen("tcp", addr)
|
||||
|
Loading…
Reference in New Issue
Block a user