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.
This commit is contained in:
parent
e921dcf503
commit
c73b7a65f5
1 changed files with 1 additions and 1 deletions
|
@ -654,7 +654,7 @@ func runWeb(ctx *cli.Context) error {
|
||||||
case setting.FCGI:
|
case setting.FCGI:
|
||||||
err = fcgi.Serve(nil, m)
|
err = fcgi.Serve(nil, m)
|
||||||
case setting.UnixSocket:
|
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)
|
log.Fatal(4, "Failed to remove unix socket directory %s: %v", listenAddr, err)
|
||||||
}
|
}
|
||||||
var listener *net.UnixListener
|
var listener *net.UnixListener
|
||||||
|
|
Loading…
Reference in a new issue