Codebase list golang-github-vbauerster-mpb / 294347a
check frame.complete first Vladimir Bauer 4 years ago
1 changed file(s) with 3 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
311311 if err != nil {
312312 return err
313313 }
314 if frame.abort {
315 s.barShutdownQueue = append(s.barShutdownQueue, b)
316 } else if frame.complete {
314 if frame.complete {
317315 // shutdown at next flush
318316 // this ensures no bar ends up with less than 100% rendered
319317 defer func() {
320318 s.barShutdownQueue = append(s.barShutdownQueue, b)
321319 }()
320 } else if frame.abort {
321 s.barShutdownQueue = append(s.barShutdownQueue, b)
322322 }
323323 totalLines += frame.lines
324324 bm[b] = frame