mirror of
https://github.com/go-gitea/gitea
synced 2025-08-17 23:18:28 +00:00
Backport #18823 Currently Gitea will wait for HammerTime or nice shutdown if kill -1 or kill -2 is sent. We should just immediately hammer if there is a second kill. Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
@@ -192,6 +192,7 @@ func (g *Manager) RunAtHammer(hammer func()) {
|
||||
}
|
||||
func (g *Manager) doShutdown() {
|
||||
if !g.setStateTransition(stateRunning, stateShuttingDown) {
|
||||
g.DoImmediateHammer()
|
||||
return
|
||||
}
|
||||
g.lock.Lock()
|
||||
|
Reference in New Issue
Block a user