Skip to content

Commit

Permalink
Fix(cannon): Fix nil next panic
Browse files Browse the repository at this point in the history
  • Loading branch information
samcm committed Oct 3, 2023
1 parent fc5c93c commit 96d030f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/cannon/iterator/checkpoint_iterator.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ func (c *CheckpointIterator) Next(ctx context.Context) (next *xatu.CannonLocatio
defer func() {
if err != nil {
span.RecordError(err)
}

epoch, err := c.getEpochFromLocation(next)
if err == nil {
span.SetAttributes(attribute.Int64("next", int64(epoch)))
} else {
epoch, err := c.getEpochFromLocation(next)
if err == nil {
span.SetAttributes(attribute.Int64("next", int64(epoch)))
}
}

span.End()
Expand Down

0 comments on commit 96d030f

Please sign in to comment.