merlimat commented on a change in pull request #598:
URL: https://github.com/apache/pulsar-client-go/pull/598#discussion_r695367596



##########
File path: pulsar/producer_impl.go
##########
@@ -190,8 +190,10 @@ func (p *producer) internalCreatePartitionsProducers() 
error {
        p.producers = make([]Producer, newNumPartitions)
 
        // Copy over the existing consumer instances
-       for i := 0; i < oldNumPartitions; i++ {
-               p.producers[i] = oldProducers[i]
+       if oldProducers != nil {

Review comment:
       This could be moved few lines above, where there is already a block that 
checks for != nil




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to