From 7cb37cd812d9646499bdb37571e77a978a588389 Mon Sep 17 00:00:00 2001 From: Zixuan Liu Date: Fri, 12 Jul 2024 15:28:28 +0800 Subject: [PATCH] Fix cnx --- pulsar/producer_partition.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pulsar/producer_partition.go b/pulsar/producer_partition.go index 3e87775781..e0981303f3 100755 --- a/pulsar/producer_partition.go +++ b/pulsar/producer_partition.go @@ -301,7 +301,7 @@ func (p *partitionProducer) grabCnx(assignedBrokerURL string) error { p.log.WithError(err).Error("Failed to create producer at send PRODUCER request") if errors.Is(err, internal.ErrRequestTimeOut) { id := p.client.rpcClient.NewRequestID() - _, _ = p.client.rpcClient.RequestOnCnx(res.Cnx, id, pb.BaseCommand_CLOSE_PRODUCER, + _, _ = p.client.rpcClient.RequestOnCnx(cnx, id, pb.BaseCommand_CLOSE_PRODUCER, &pb.CommandCloseProducer{ ProducerId: &p.producerID, RequestId: &id,