Commit b27f7da
committed
task: don't
The contract for `cio/io.go/IO` states that a call to `Close()`
will always be preceded by a call to `Cancel()` -
https://github.com/containerd/containerd/blob/f3a07934b49bf142925a5913e3e19f3528eda0d2/cio/io.go#L59
which isn't being held up here.
Furthermore, the call to `Close()` here makes the subsequent `Wait()`
moot, and causes issues to consumers (see: moby/moby#45689)
It seems from
https://github.com/containerd/containerd/blob/f3a07934b49bf142925a5913e3e19f3528eda0d2/task.go#L338
that the `Close()` should be called there, the call removed in this
commit is unnecessary/erroneous.
We leave the `Close()` call on Windows only since this was introduced
in #5974 to address
#5621.
Signed-off-by: Laura Brehm <[email protected]>
(cherry picked from commit 34a93a0)
Signed-off-by: Laura Brehm <[email protected]>close() io before cancel()
1 parent 7902825 commit b27f7da
1 file changed
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
328 | | - | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
329 | 338 | | |
330 | 339 | | |
331 | 340 | | |
| |||
0 commit comments