Dropping 5s waiting to finish everything to 1s

This commit is contained in:
Adam Štrauch 2021-09-06 18:34:38 +02:00
parent f2c3ef49e9
commit f7340728be
Signed by: cx
GPG Key ID: 018304FFA8988F8D

View File

@ -167,7 +167,7 @@ func main() {
if config.Register { if config.Register {
log.Printf("%s signal received, sending goodbye packet\n", sig.String()) log.Printf("%s signal received, sending goodbye packet\n", sig.String())
sendGoodbyePacket() sendGoodbyePacket()
time.Sleep(5 * time.Second) // we wait for a few seconds to let background jobs to finish their job time.Sleep(1 * time.Second) // we wait for a few seconds to let background jobs to finish their job
} else { } else {
log.Printf("%s signal received", sig.String()) log.Printf("%s signal received", sig.String())
} }
@ -175,5 +175,6 @@ func main() {
}(e, config) }(e, config)
// Start server // Start server
e.Logger.Error(e.Start(config.Host + ":" + strconv.Itoa(int(config.Port)))) // In most cases this will end expectedly so it doesn't make sense to use the echo's approach to treat this message as an error.
e.Logger.Info(e.Start(config.Host + ":" + strconv.Itoa(int(config.Port))))
} }