diff options
author | Bwko <bouwko@gmail.com> | 2016-12-01 00:56:15 +0100 |
---|---|---|
committer | Kim "BKC" Carlbäcker <kim.carlbacker@gmail.com> | 2016-12-02 07:41:19 +0100 |
commit | 4ff0db0246fa8a2add1032220024975203b93d72 (patch) | |
tree | 6395dd608ba47cc6429bc12d9595f09ebb915f02 /cmd/web.go | |
parent | 5ab85372da74bd95f7143fd59c2c600d4c9894d0 (diff) | |
download | gitea-4ff0db0246fa8a2add1032220024975203b93d72.tar.gz gitea-4ff0db0246fa8a2add1032220024975203b93d72.zip |
Catch os... errors
Diffstat (limited to 'cmd/web.go')
-rw-r--r-- | cmd/web.go | 5 |
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 { |