task delete: Closes task IO before waiting
After containerd restarts, it will try to recover its sandboxes, containers, and images. If it detects a task in the Created or Stopped state, it will be removed. This will cause the containerd process it hang on Windows on the t.io.Wait() call. Calling t.io.Close() beforehand will solve this issue. Additionally, the same issue occurs when trying to stopp a sandbox after containerd restarts. This will solve that case as well. Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
This commit is contained in:
parent
d58542a9d1
commit
55faa5e93d
@ -50,6 +50,10 @@ func openPipe(ctx context.Context, fn string, flag int, perm os.FileMode) (io.Re
|
||||
}
|
||||
p.con = c
|
||||
}()
|
||||
go func() {
|
||||
<-ctx.Done()
|
||||
p.Close()
|
||||
}()
|
||||
return p, nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user