remove countdown on auto restart

This commit is contained in:
wish
2023-03-09 22:23:45 +11:00
parent 3692a14067
commit ce30c1231d

14
main.go
View File

@@ -246,13 +246,15 @@ func main() {
signal.Notify(c, os.Interrupt, syscall.SIGTERM) signal.Notify(c, os.Interrupt, syscall.SIGTERM)
<-c <-c
for i := 0; i < 10; i++ { if !config.ErupeConfig.DisableSoftCrash {
message := fmt.Sprintf("Shutting down in %d...", 10-i) for i := 0; i < 10; i++ {
for _, c := range channels { message := fmt.Sprintf("Shutting down in %d...", 10-i)
c.BroadcastChatMessage(message) for _, c := range channels {
c.BroadcastChatMessage(message)
}
logger.Info(message)
time.Sleep(time.Second)
} }
logger.Info(message)
time.Sleep(time.Second)
} }
if config.ErupeConfig.Channel.Enabled { if config.ErupeConfig.Channel.Enabled {