mirror of
https://github.com/owncloud/ocis
synced 2026-04-25 17:25:21 +02:00
rely on context from app
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
@@ -47,13 +47,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)
|
||||
}()
|
||||
m = metrics.New()
|
||||
ctx, cancel = context.WithCancel(c.Context)
|
||||
m = metrics.New()
|
||||
)
|
||||
|
||||
defer cancel()
|
||||
|
||||
Reference in New Issue
Block a user