From b2c14078b513f7d90208619f7495a2f276d7ea24 Mon Sep 17 00:00:00 2001 From: Pip Taylor Date: Thu, 4 Jul 2024 14:20:58 +0100 Subject: [PATCH] Make sure we save the context we cancel on Ctrl-C --- cmd/catalog-importer/cmd/app.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/catalog-importer/cmd/app.go b/cmd/catalog-importer/cmd/app.go index ff56314..28176b3 100644 --- a/cmd/catalog-importer/cmd/app.go +++ b/cmd/catalog-importer/cmd/app.go @@ -76,7 +76,7 @@ func Run(ctx context.Context) (err error) { stdlog.SetOutput(kitlog.NewStdlibAdapter(logger)) // Root context to the application. - _, cancel := context.WithCancel(context.Background()) + ctx, cancel := context.WithCancel(context.Background()) defer cancel() // Setup signal handling.