Skip to content

Commit c04bade

Browse files
committed
no need
1 parent 285d94f commit c04bade

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

source/logrepl/cdc.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,7 @@ func (i *CDCIterator) NextN(ctx context.Context, n int) ([]opencdc.Record, error
151151
case rec := <-i.records:
152152
recs = append(recs, rec)
153153
case <-ctx.Done():
154-
// Return what we have with the error
155-
return recs, ctx.Err()
154+
return nil, ctx.Err()
156155
case <-i.sub.Done():
157156
if err := i.sub.Err(); err != nil {
158157
return recs, fmt.Errorf("logical replication error: %w", err)

0 commit comments

Comments
 (0)