Skip to content

Commit

Permalink
[Fix] return when registerSendOrAckOp() failed (#1045)
Browse files Browse the repository at this point in the history
Master Issue: #1040

### Motivation


fix #1040, return when registerSendOrAckOp() return an error.

### Modifications

- modified: pulsar/producer_partition.go

---------

Co-authored-by: gunli <gunli@tencent.com>
  • Loading branch information
gunli and gunli committed Jul 5, 2023
1 parent 163cd7e commit aa66471
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pulsar/producer_partition.go
Original file line number Diff line number Diff line change
Expand Up @@ -1126,6 +1126,7 @@ func (p *partitionProducer) internalSendAsync(ctx context.Context, msg *Producer
}
if err := transactionImpl.registerSendOrAckOp(); err != nil {
runCallback(callback, nil, msg, err)
return
}
newCallback = func(id MessageID, producerMessage *ProducerMessage, err error) {
runCallback(callback, id, producerMessage, err)
Expand Down

0 comments on commit aa66471

Please sign in to comment.