Skip to content

Commit

Permalink
optimize retry flag in Controller.Status function
Browse files Browse the repository at this point in the history
Signed-off-by: sunchunming <sunchunming1@jd.com>
  • Loading branch information
sunchunming committed Nov 19, 2021
1 parent 07adb7c commit 90d30bd
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions control/control.go
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,8 @@ func (c *Controller) Status(req *controlapi.StatusRequest, stream controlapi.Con
return nil
}
logSize := 0
retry := false
for {
retry := false
sr := controlapi.StatusResponse{}
for _, v := range ss.Vertexes {
sr.Vertexes = append(sr.Vertexes, &controlapi.Vertex{
Expand Down Expand Up @@ -374,8 +374,6 @@ func (c *Controller) Status(req *controlapi.StatusRequest, stream controlapi.Con
ss.Logs = ss.Logs[i+1:]
retry = true
break
} else {
retry = false
}
}
if err := stream.SendMsg(&sr); err != nil {
Expand Down

0 comments on commit 90d30bd

Please sign in to comment.