summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorsurefire <repsac-by@users.noreply.github.com>2017-02-05 15:27:37 +0300
committerLunny Xiao <xiaolunwen@gmail.com>2017-02-05 20:27:37 +0800
commitc73b7a65f5ca4ce580694cf5b4a38b0d2893231a (patch)
tree3be3ca0c2d5cefc1c320057f5096d8c5d0e15b0b /cmd
parente921dcf503011fa999fd0c763d4439bb46886e35 (diff)
downloadgitea-c73b7a65f5ca4ce580694cf5b4a38b0d2893231a.tar.gz
gitea-c73b7a65f5ca4ce580694cf5b4a38b0d2893231a.zip
Fix remove unix socket listenAddr (#846)
Because the absence of the listenAddr is what is expected. The error will only be then when we can't remove.
Diffstat (limited to 'cmd')
-rw-r--r--cmd/web.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/web.go b/cmd/web.go
index 0d18e86313..0af338ee21 100644
--- a/cmd/web.go
+++ b/cmd/web.go
@@ -654,7 +654,7 @@ func runWeb(ctx *cli.Context) error {
case setting.FCGI:
err = fcgi.Serve(nil, m)
case setting.UnixSocket:
- if err := os.Remove(listenAddr); err != nil {
+ if err := os.Remove(listenAddr); err != nil && !os.IsNotExist(err) {
log.Fatal(4, "Failed to remove unix socket directory %s: %v", listenAddr, err)
}
var listener *net.UnixListener