merlimat commented on a change in pull request #451:
URL: https://github.com/apache/pulsar-client-go/pull/451#discussion_r564217027
##########
File path: pulsar/producer_partition.go
##########
@@ -443,7 +447,7 @@ func (p *partitionProducer) internalFlushCurrentBatch() {
func (p *partitionProducer) failTimeoutMessages() {
// since Closing/Closed connection couldn't be reopen, load and compare
is safe
- state := atomic.LoadInt32(&p.state)
+ state := p.getProduerState()
Review comment:
```suggestion
state := p.getProducerState()
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]