aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/web.go
diff options
context:
space:
mode:
authorBwko <bouwko@gmail.com>2016-12-01 00:56:15 +0100
committerKim "BKC" Carlbäcker <kim.carlbacker@gmail.com>2016-12-02 07:41:19 +0100
commit4ff0db0246fa8a2add1032220024975203b93d72 (patch)
tree6395dd608ba47cc6429bc12d9595f09ebb915f02 /cmd/web.go
parent5ab85372da74bd95f7143fd59c2c600d4c9894d0 (diff)
downloadgitea-4ff0db0246fa8a2add1032220024975203b93d72.tar.gz
gitea-4ff0db0246fa8a2add1032220024975203b93d72.zip
Catch os... errors
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 {