Skip to content

Commit

Permalink
Prevent panicking when SQS consumer is disabled (#50643)
Browse files Browse the repository at this point in the history
  • Loading branch information
lcharkiewicz authored Dec 31, 2024
1 parent 909cc20 commit b44d19b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/events/athena/athena.go
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,11 @@ func (l *Log) SearchSessionEvents(ctx context.Context, req events.SearchSessionE
}

func (l *Log) Close() error {
return trace.Wrap(l.consumerCloser.Close())
// consumerCloser is nil when consumer is disabled.
if l.consumerCloser != nil {
return trace.Wrap(l.consumerCloser.Close())
}
return nil
}

func (l *Log) IsConsumerDisabled() bool {
Expand Down

0 comments on commit b44d19b

Please sign in to comment.