Skip to content

Commit

Permalink
pubsub/all: remove unnecessary nil check (#3517)
Browse files Browse the repository at this point in the history
  • Loading branch information
knbr13 authored Jan 21, 2025
1 parent 674f414 commit eaaf976
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pubsub/pubsub.go
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ func (s *Subscription) Receive(ctx context.Context) (_ *Message, err error) {
}
resultChannel := s.getNextBatch(batchSize)
for msgsOrError := range resultChannel {
if msgsOrError.msgs != nil && len(msgsOrError.msgs) > 0 {
if len(msgsOrError.msgs) > 0 {
// messages received from channel
s.mu.Lock()
s.q = append(s.q, msgsOrError.msgs...)
Expand Down

0 comments on commit eaaf976

Please sign in to comment.