summaryrefslogtreecommitdiffstats
path: root/modules/graceful
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2020-10-19 22:03:08 +0100
committerGitHub <noreply@github.com>2020-10-19 17:03:08 -0400
commit2f1353a2f33762e10a304cbebf3a6a8d0381d316 (patch)
treeb345bf060a107341c64447f7132d9e2b8d37a7b3 /modules/graceful
parent3ddf3f93d6346ac9440a7a571faea4b5c1c329be (diff)
downloadgitea-2f1353a2f33762e10a304cbebf3a6a8d0381d316.tar.gz
gitea-2f1353a2f33762e10a304cbebf3a6a8d0381d316.zip
Move install pages out of main macaron routes (#13195)
* Move install pages out of main macaron loop Signed-off-by: Andrew Thornton <art27@cantab.net> * Update templates/post-install.tmpl Co-authored-by: Lauris BH <lauris@nix.lv> * remove prefetch Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'modules/graceful')
-rw-r--r--modules/graceful/manager.go2
-rw-r--r--modules/graceful/server.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/graceful/manager.go b/modules/graceful/manager.go
index 6b134e7d0c..903d05ed21 100644
--- a/modules/graceful/manager.go
+++ b/modules/graceful/manager.go
@@ -31,7 +31,7 @@ const (
//
// If you add an additional place you must increment this number
// and add a function to call manager.InformCleanup if it's not going to be used
-const numberOfServersToCreate = 3
+const numberOfServersToCreate = 4
// Manager represents the graceful server manager interface
var manager *Manager
diff --git a/modules/graceful/server.go b/modules/graceful/server.go
index db73174ac1..e7394f349e 100644
--- a/modules/graceful/server.go
+++ b/modules/graceful/server.go
@@ -162,7 +162,7 @@ func (srv *Server) Serve(serve ServeFunction) error {
srv.setState(stateTerminate)
GetManager().ServerDone()
// use of closed means that the listeners are closed - i.e. we should be shutting down - return nil
- if err != nil && strings.Contains(err.Error(), "use of closed") {
+ if err == nil || strings.Contains(err.Error(), "use of closed") || strings.Contains(err.Error(), "http: Server closed") {
return nil
}
return err