Skip to content

Commit 96a05f9

Browse files
committed
Fix task cancel context
1 parent d16ad13 commit 96a05f9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

common/task/task.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ func (g *Group) RunContextList(contextList []context.Context) error {
8888

8989
selectedContext, upstreamErr := common.SelectContext(append([]context.Context{taskCancelContext}, contextList...))
9090

91+
if selectedContext == 0 {
92+
taskCancel(upstreamErr)
93+
}
94+
9195
if g.cleanup != nil {
9296
g.cleanup()
9397
}

0 commit comments

Comments
 (0)