Skip to content

Commit 4d08632

Browse files
authored
should be cancelled here (#390)
1 parent 1f93621 commit 4d08632

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rpc/rpc.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,6 @@ func (v *Vibranium) RunAndWait(stream pb.CoreRPC_RunAndWaitServer) error {
826826
// force mark stdin to false
827827
opts.OpenStdin = false
828828
}
829-
defer cancel()
830829

831830
v.taskAdd("RunAndWait", true)
832831

@@ -865,6 +864,7 @@ func (v *Vibranium) RunAndWait(stream pb.CoreRPC_RunAndWaitServer) error {
865864
// then deal with the rest messages
866865
runAndWait := func(f func(<-chan *types.AttachWorkloadMessage)) {
867866
defer v.taskDone("RunAndWait", true)
867+
defer cancel()
868868
f(ch)
869869
}
870870

0 commit comments

Comments
 (0)