diff options
Diffstat (limited to 'vendor/github.com/vbauerster')
-rw-r--r-- | vendor/github.com/vbauerster/mpb/v7/bar.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/vendor/github.com/vbauerster/mpb/v7/bar.go b/vendor/github.com/vbauerster/mpb/v7/bar.go index ca191cf39..95d4439f8 100644 --- a/vendor/github.com/vbauerster/mpb/v7/bar.go +++ b/vendor/github.com/vbauerster/mpb/v7/bar.go @@ -268,13 +268,15 @@ func (b *Bar) SetPriority(priority int) { // if bar is already in complete state. If drop is true bar will be // removed as well. func (b *Bar) Abort(drop bool) { + if drop { + b.container.dropBar(b) // It is safe to call this multiple times with the same bar + } select { case b.operateState <- func(s *bState) { if s.completed == true { return } if drop { - b.container.dropBar(b) b.cancel() return } |