RobertIndie commented on code in PR #878: URL: https://github.com/apache/pulsar-client-go/pull/878#discussion_r1190912395
########## pulsar/producer_partition.go: ########## @@ -1035,9 +1035,13 @@ func (p *partitionProducer) Send(ctx context.Context, msg *ProducerMessage) (Mes }, true) // wait for send request to finish - <-doneCh - - return msgID, err + select { + case <-ctx.Done(): + isDone.Store(true) + return msgID, ctx.Err() + case <-doneCh: + return msgID, err Review Comment: We shouldn't return msgID and err here. They are not assigned here. -- 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-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org