diff --git a/task.go b/task.go index a780ed8bd..61191d312 100644 --- a/task.go +++ b/task.go @@ -188,6 +188,7 @@ func (t *task) Wait(ctx context.Context) (uint32, error) { // during cleanup func (t *task) Delete(ctx context.Context) (uint32, error) { if t.io != nil { + t.io.Cancel() t.io.Wait() t.io.Close() }