Chore: Use cli.Context instead of background context in RunServer function (#109553)

Use cli.Context instead of background context in RunServer function
This commit is contained in:
Sofia Papagiannaki
2025-08-15 08:48:06 +00:00
committed by GitHub
parent 5007f362f3
commit d4395aeec3
+2 -4
View File
@@ -106,15 +106,13 @@ func RunServer(opts standalone.BuildInfo, cli *cli.Context) error {
metrics.SetBuildInformation(metrics.ProvideRegisterer(), opts.Version, opts.Commit, opts.BuildBranch, getBuildstamp(opts))
ctx := context.Background()
// Initialize the OpenFeature feature flag system
if err := featuremgmt.InitOpenFeatureWithCfg(cfg); err != nil {
return err
}
s, err := server.Initialize(
ctx,
cli.Context,
cfg,
server.Options{
PidFile: PidFile,
@@ -128,7 +126,7 @@ func RunServer(opts standalone.BuildInfo, cli *cli.Context) error {
return err
}
go listenToSystemSignals(ctx, s)
go listenToSystemSignals(cli.Context, s)
return s.Run()
}