registry: fix reporter client context on config change (#5392)

This commit is contained in:
Joe Kralicky 2024-12-13 14:01:34 -05:00 committed by GitHub
parent d383c13b48
commit f876e2f31d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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
}