Skip to content

Commit

Permalink
Prevent panicking when SQS consumer is disabled (#50646)
Browse files Browse the repository at this point in the history
  • Loading branch information
lcharkiewicz authored Dec 31, 2024
1 parent 3164d21 commit 10115c0
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 @@ -543,7 +543,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 10115c0

Please sign in to comment.