summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2019-10-23 16:32:19 +0100
committerGitHub <noreply@github.com>2019-10-23 16:32:19 +0100
commitf067e12859715bcf33897ce2b7edc825708d0bae (patch)
treea2a705fbaf110ab76fdb7f3e7d9395d59f320955 /cmd
parent7d1a7c05dbe7891c4851a494e87f86c17bb12141 (diff)
downloadgitea-f067e12859715bcf33897ce2b7edc825708d0bae.tar.gz
gitea-f067e12859715bcf33897ce2b7edc825708d0bae.zip
Graceful fixes (#8645)
* Only attempt to kill parent once * Apply suggestions from code review Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> * Add waitgroup for running servers
Diffstat (limited to 'cmd')
-rw-r--r--cmd/web.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/cmd/web.go b/cmd/web.go
index ae05b9e145..3ca4041a7d 100644
--- a/cmd/web.go
+++ b/cmd/web.go
@@ -13,6 +13,7 @@ import (
"os"
"strings"
+ "code.gitea.io/gitea/modules/graceful"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/routers"
@@ -226,6 +227,7 @@ func runWeb(ctx *cli.Context) error {
log.Critical("Failed to start server: %v", err)
}
log.Info("HTTP Listener: %s Closed", listenAddr)
+ graceful.WaitForServers()
log.Close()
return nil
}