diff --git a/server/main.go b/server/main.go index b4a3f0d..b486261 100644 --- a/server/main.go +++ b/server/main.go @@ -18,12 +18,13 @@ func main() { go func() { <-sig - shutdownCtx, _ := context.WithTimeout(serverCtx, 30*time.Second) + shutdownCtx, cancel := context.WithTimeout(serverCtx, 30*time.Second) go func() { <-shutdownCtx.Done() if shutdownCtx.Err() == context.DeadlineExceeded { log.Println("Shutdown timeout, force exit") + cancel() } }()