diff --git a/pkg/ccl/crosscluster/producer/span_config_event_stream.go b/pkg/ccl/crosscluster/producer/span_config_event_stream.go index feb2c73c5be6..90df0fb04eb1 100644 --- a/pkg/ccl/crosscluster/producer/span_config_event_stream.go +++ b/pkg/ccl/crosscluster/producer/span_config_event_stream.go @@ -157,7 +157,12 @@ func (s *spanConfigEventStream) Next(ctx context.Context) (bool, error) { case err := <-s.errCh: return false, err case s.data = <-s.streamCh: - return true, nil + select { + case err := <-s.errCh: + return false, err + default: + return true, nil + } } }