bruth opened a new pull request #3054: Remove channel closure URL: https://github.com/apache/pulsar/pull/3054 ### Motivation Closing this channel introduces a data race with [this send operation](https://github.com/apache/pulsar/blob/fe2c8ee4d37e2a45dfb528592915746827416e18/pulsar-client-go/pulsar/c_consumer.go#L188) which could lead to a panic (if a send occurs on a closed channel). This was discovered using the `-race` flag with a local test. The second issue is that since the consumer is closing the channel that may be passed by the `ConsumerOptions` or `ReaderOptions`. In general, it is a better practice to leave closing the channel up to the caller. ### Modifications This change removes the closing of the message channel. One unrelated `gofmt` change is included as well. ### Result A data race will be removed.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
