You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/08/25 03:40:45 UTC

[GitHub] [pulsar-client-go] merlimat commented on a change in pull request #598: Fix producer panic by oldProducers

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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org