Skip to content

Commit

Permalink
Fix graceful doc (#20883)
Browse files Browse the repository at this point in the history
  • Loading branch information
wxiaoguang authored Aug 21, 2022
1 parent 11bae50 commit 6784a70
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions modules/graceful/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
}
Expand Down

0 comments on commit 6784a70

Please sign in to comment.