Fix possible context leaks

This commit is contained in:
Darren Shepherd
2020-05-22 15:34:59 -07:00
parent 77ce1a15b3
commit dc9f969673
2 changed files with 2 additions and 0 deletions

View File

@@ -182,6 +182,7 @@ func (r *RBACStore) Watch(apiOp *types.APIRequest, schema *types.APISchema, w ty
}
ctx, cancel := context.WithCancel(apiOp.Context())
defer cancel()
apiOp = apiOp.WithContext(ctx)
eg := errgroup.Group{}