registry: fix reporter client context on config change

This commit is contained in:
Joe Kralicky 2024-12-10 19:01:27 +00:00
parent 2bb70258c3
commit 65ade8a67e
No known key found for this signature in database
GPG key ID: 75C4875F34A9FB79

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
}