File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ func (g *Group) RunContextList(contextList []context.Context) error {
64
64
}
65
65
66
66
taskContext , taskFinish := common .ContextWithCancelCause (context .Background ())
67
- taskCancelContext , taskCancel := common .ContextWithCancelCause (context . Background () )
67
+ taskCancelContext , taskCancel := common .ContextWithCancelCause (contextList [ 0 ] )
68
68
69
69
var errorAccess sync.Mutex
70
70
var returnError error
@@ -112,11 +112,8 @@ func (g *Group) RunContextList(contextList []context.Context) error {
112
112
}()
113
113
}
114
114
115
- selectedContext , upstreamErr := common .SelectContext (append ([]context.Context {taskCancelContext }, contextList ... ))
116
-
117
- if selectedContext != 0 {
118
- taskCancel (upstreamErr )
119
- }
115
+ selectedContext , upstreamErr := common .SelectContext (append ([]context.Context {taskCancelContext }, contextList [1 :]... ))
116
+ taskCancel (upstreamErr )
120
117
121
118
if g .cleanup != nil {
122
119
g .cleanup ()
You can’t perform that action at this time.
0 commit comments