From 9f7bad7dac6caff3c920403e34084a295016a1c5 Mon Sep 17 00:00:00 2001 From: Miloslav Trmač Date: Tue, 31 Aug 2021 15:17:45 +0200 Subject: Use UNMERGED vbauerster/mpb PR to fix a pull deadlock MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit > go mod edit -replace github.com/vbauerster/mpb/v7=github.com/mtrmac/mpb/v7@abort-deadlock > make vendor See https://github.com/vbauerster/mpb/issues/100 and https://github.com/vbauerster/mpb/pull/101 . Signed-off-by: Miloslav Trmač --- vendor/github.com/vbauerster/mpb/v7/bar.go | 4 +++- vendor/modules.txt | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'vendor') 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 } diff --git a/vendor/modules.txt b/vendor/modules.txt index 5eb059dcd..3666ff40b 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -612,7 +612,7 @@ github.com/vbauerster/mpb/v6 github.com/vbauerster/mpb/v6/cwriter github.com/vbauerster/mpb/v6/decor github.com/vbauerster/mpb/v6/internal -# github.com/vbauerster/mpb/v7 v7.1.3 +# github.com/vbauerster/mpb/v7 v7.1.3 => github.com/mtrmac/mpb/v7 v7.0.5-0.20210831125917-6bcc64f93d02 github.com/vbauerster/mpb/v7 github.com/vbauerster/mpb/v7/cwriter github.com/vbauerster/mpb/v7/decor -- cgit v1.2.3-54-g00ecf