Skip to content

Commit

Permalink
Comment catchFirstFatal function
Browse files Browse the repository at this point in the history
  • Loading branch information
mcastorina committed Jul 31, 2023
1 parent 30629e4 commit d010c82
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/sources/source_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,8 @@ func (s *SourceManager) runWithUnits(ctx context.Context, handle handle, source
unitCh: make(chan SourceUnit),
report: report,
}
// Create a function that will save the first error encountered (if
// any) and discard the rest.
fatalErr := make(chan error, 1)
catchFirstFatal := func(err error) {
select {
Expand Down

0 comments on commit d010c82

Please sign in to comment.