diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2022-08-21 14:50:27 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-21 02:50:27 -0400 |
commit | 6784a707d101ef31a9ef3a46468c28e1d9700ac8 (patch) | |
tree | a1d7524da290f65eb91810005305bd63a370b0da /modules/graceful | |
parent | 11bae504846293806fec27f3271e0d3aba8f0f93 (diff) | |
download | gitea-6784a707d101ef31a9ef3a46468c28e1d9700ac8.tar.gz gitea-6784a707d101ef31a9ef3a46468c28e1d9700ac8.zip |
Fix graceful doc (#20883)
Diffstat (limited to 'modules/graceful')
-rw-r--r-- | modules/graceful/manager.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/modules/graceful/manager.go b/modules/graceful/manager.go index 8766cfca0e..21f019fb56 100644 --- a/modules/graceful/manager.go +++ b/modules/graceful/manager.go @@ -24,11 +24,12 @@ const ( stateTerminate ) -// There are three places that could inherit sockets: +// There are some places that could inherit sockets: // // * HTTP or HTTPS main listener +// * HTTP or HTTPS install listener // * HTTP redirection fallback -// * SSH +// * Builtin SSH listener // // 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 @@ -305,8 +306,9 @@ func (g *Manager) setState(st state) { g.state = st } -// InformCleanup tells the cleanup wait group that we have either taken a listener -// or will not be taking a listener +// InformCleanup tells the cleanup wait group that we have either taken a listener or will not be taking a listener. +// At the moment the total number of servers (numberOfServersToCreate) are pre-defined as a const before global init, +// so this function MUST be called if a server is not used. func (g *Manager) InformCleanup() { g.createServerWaitGroup.Done() } |