Skip to content

Commit

Permalink
Ensure simple logger shuts down properly (#4473)
Browse files Browse the repository at this point in the history
  • Loading branch information
theunrepentantgeek authored Dec 3, 2024
1 parent 79d125c commit e481f6b
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions v2/cmd/asoctl/pkg/importreporter/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,14 @@ func newLogProgress(
total += int64(delta.pending)

// If we're done, finish up
if parent == nil && total > 0 && completed >= total {
// We're the root importreporter log, so we also need to handle the done channel
close(done)
if total > 0 && completed >= total {
close(result.updates)

if parent == nil {
// We're the root importreporter log, so we also need to handle the done channel
close(done)
}

break
}

Expand Down

0 comments on commit e481f6b

Please sign in to comment.