From f7340728be015e2158e28f28897d91bf1231b351 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20=C5=A0trauch?= Date: Mon, 6 Sep 2021 18:34:38 +0200 Subject: [PATCH] Dropping 5s waiting to finish everything to 1s --- daemon/main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/daemon/main.go b/daemon/main.go index 5398c74..7f3c9cd 100644 --- a/daemon/main.go +++ b/daemon/main.go @@ -167,7 +167,7 @@ func main() { if config.Register { log.Printf("%s signal received, sending goodbye packet\n", sig.String()) 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 { log.Printf("%s signal received", sig.String()) } @@ -175,5 +175,6 @@ func main() { }(e, config) // 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)))) }