fix progress bar mutex

This commit is contained in:
Megan Marsh 2018-09-12 10:53:15 -07:00
parent 9a500d85e2
commit 77980a7b53
1 changed files with 1 additions and 1 deletions

View File

@ -69,6 +69,7 @@ func (spb *StackableProgressBar) prefix() {
func (spb *StackableProgressBar) Finish() {
spb.mtx.Lock()
defer spb.mtx.Unlock()
spb.items--
if spb.items == 0 {
@ -80,7 +81,6 @@ func (spb *StackableProgressBar) Finish() {
return
}
spb.prefix()
spb.mtx.Unlock()
}
// BasicProgressBar is packer's basic progress bar.