f96a6285 by astaxie

fix #978

1 parent e938876c
Showing 1 changed file with 7 additions and 0 deletions
......@@ -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)
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!