rely on context from app
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
@@ -37,13 +37,8 @@ func Server(cfg *config.Config) *cli.Command {
|
||||
|
||||
var (
|
||||
gr = run.Group{}
|
||||
ctx, cancel = func() (context.Context, context.CancelFunc) {
|
||||
if cfg.Context == nil {
|
||||
return context.WithCancel(context.Background())
|
||||
}
|
||||
return context.WithCancel(cfg.Context)
|
||||
}()
|
||||
metrics = metrics.New(metrics.Logger(logger))
|
||||
ctx, cancel = context.WithCancel(c.Context)
|
||||
metrics = metrics.New(metrics.Logger(logger))
|
||||
)
|
||||
|
||||
defer cancel()
|
||||
|
||||
Reference in New Issue
Block a user