libnet: Add ctx to NewSandbox

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
This commit is contained in:
Albin Kerouanton
2024-05-11 18:55:04 +02:00
parent 4924f56e7b
commit 9391052700
10 changed files with 38 additions and 33 deletions

View File

@@ -542,7 +542,7 @@ func (daemon *Daemon) allocateNetwork(ctx context.Context, cfg *config.Config, c
if err != nil {
return err
}
sb, err := daemon.netController.NewSandbox(container.ID, sbOptions...)
sb, err := daemon.netController.NewSandbox(ctx, container.ID, sbOptions...)
if err != nil {
return err
}
@@ -784,7 +784,7 @@ func (daemon *Daemon) connectToNetwork(ctx context.Context, cfg *config.Config,
if err != nil {
return err
}
sb, err = daemon.netController.NewSandbox(container.ID, sbOptions...)
sb, err = daemon.netController.NewSandbox(ctx, container.ID, sbOptions...)
if err != nil {
return err
}