From f876e2f31d39cb06864d5ddb9204d0e9807be5ba Mon Sep 17 00:00:00 2001 From: Joe Kralicky Date: Fri, 13 Dec 2024 14:01:34 -0500 Subject: [PATCH] registry: fix reporter client context on config change (#5392) --- internal/registry/reporter.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/registry/reporter.go b/internal/registry/reporter.go index e647659a2..f34b87e91 100644 --- a/internal/registry/reporter.go +++ b/internal/registry/reporter.go @@ -59,7 +59,7 @@ func (r *Reporter) OnConfigChange(ctx context.Context, cfg *config.Config) { } if len(services) > 0 { - ctx, cancel := context.WithCancel(context.TODO()) + ctx, cancel := context.WithCancel(ctx) go runReporter(ctx, pb.NewRegistryClient(registryConn), services) r.cancel = cancel }