Skip to content

Commit 6784a70

Browse files
authored
Fix graceful doc (#20883)
1 parent 11bae50 commit 6784a70

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

modules/graceful/manager.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@ const (
2424
stateTerminate
2525
)
2626

27-
// There are three places that could inherit sockets:
27+
// There are some places that could inherit sockets:
2828
//
2929
// * HTTP or HTTPS main listener
30+
// * HTTP or HTTPS install listener
3031
// * HTTP redirection fallback
31-
// * SSH
32+
// * Builtin SSH listener
3233
//
3334
// If you add an additional place you must increment this number
3435
// 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) {
305306
g.state = st
306307
}
307308

308-
// InformCleanup tells the cleanup wait group that we have either taken a listener
309-
// or will not be taking a listener
309+
// InformCleanup tells the cleanup wait group that we have either taken a listener or will not be taking a listener.
310+
// At the moment the total number of servers (numberOfServersToCreate) are pre-defined as a const before global init,
311+
// so this function MUST be called if a server is not used.
310312
func (g *Manager) InformCleanup() {
311313
g.createServerWaitGroup.Done()
312314
}

0 commit comments

Comments
 (0)