Skip to content

Commit eaaf976

Browse files
authored
pubsub/all: remove unnecessary nil check (#3517)
1 parent 674f414 commit eaaf976

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pubsub/pubsub.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ func (s *Subscription) Receive(ctx context.Context) (_ *Message, err error) {
562562
}
563563
resultChannel := s.getNextBatch(batchSize)
564564
for msgsOrError := range resultChannel {
565-
if msgsOrError.msgs != nil && len(msgsOrError.msgs) > 0 {
565+
if len(msgsOrError.msgs) > 0 {
566566
// messages received from channel
567567
s.mu.Lock()
568568
s.q = append(s.q, msgsOrError.msgs...)

0 commit comments

Comments
 (0)