guyinyou opened a new pull request, #1275:
URL: https://github.com/apache/rocketmq-clients/pull/1275

   ## Summary
   - `err` and `resps` variables in `receiveMessage` were shared between the 
main goroutine and a spawned goroutine without synchronization, causing a data 
race detectable by Go's race detector
   - Move `resps` and `err` into the goroutine as local variables, and pass 
results back through a typed channel (`receiveResult` struct) instead of 
sharing variables across goroutines
   - Also fix `push_consumer.go` not signaling the `done` channel on non-EOF 
errors, which previously caused it to wait for context timeout instead of 
returning the actual error immediately
   - Affected: `golang/push_consumer.go` `receiveMessage()`, 
`golang/simple_consumer.go` `receiveMessage()`


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to