diff --git a/cmd/goyco/commands/progress_indicator.go b/cmd/goyco/commands/progress_indicator.go index df78ac5..2340e80 100644 --- a/cmd/goyco/commands/progress_indicator.go +++ b/cmd/goyco/commands/progress_indicator.go @@ -56,16 +56,16 @@ func newProgressIndicatorWithClock(total int, description string, c clock) *Prog func (p *ProgressIndicator) Update(current int) { p.mu.Lock() - defer p.mu.Unlock() - p.current = current now := p.clock.Now() if now.Sub(p.lastUpdate) < 100*time.Millisecond { + p.mu.Unlock() return } p.lastUpdate = now + p.mu.Unlock() p.display() }