summaryrefslogtreecommitdiffstats
path: root/cmd/web.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/web.go')
-rw-r--r--cmd/web.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd/web.go b/cmd/web.go
index c53f518af4..5442850561 100644
--- a/cmd/web.go
+++ b/cmd/web.go
@@ -654,8 +654,9 @@ func runWeb(ctx *cli.Context) error {
case setting.FCGI:
err = fcgi.Serve(nil, m)
case setting.UnixSocket:
- os.Remove(listenAddr)
-
+ if err := os.Remove(listenAddr); err != nil {
+ log.Fatal(4, "Fail to remove unix socket directory %s: %v", listenAddr, err)
+ }
var listener *net.UnixListener
listener, err = net.ListenUnix("unix", &net.UnixAddr{Name: listenAddr, Net: "unix"})
if err != nil {