leizhiyuan opened a new issue, #1098:
URL: https://github.com/apache/rocketmq-clients/issues/1098

   ### Before Creating the Enhancement Request
   
   - [x] I have confirmed that this should be classified as an enhancement 
rather than a bug/feature.
   
   
   ### Programming Language of the Client
   
   Go
   
   ### Summary
   
   ```
   go func() {
                for {
                        var resp *v2.ReceiveMessageResponse
                        resp, err = receiveMessageClient.Recv()
                        if err == io.EOF {
                                done <- true
                                defer close(done)
                                break
                        }
                        if err != nil {
                                sc.cli.log.Errorf("simpleConsumer recv msg 
err=%v, requestId=%s", err, utils.GetRequestID(ctx))
                                break
                        }
                        sugarBaseLogger.Debugf("receiveMessage response: %v", 
resp)
                        resps = append(resps, resp)
                }
                cancel()
        }()
   ```
   
   If err is an authentication failure, or other normal return failure, it 
cannot be returned to the caller.
   
   ### Motivation
   
   add                          done <- true
                                defer close(done)
   
   ### Describe the Solution You'd Like
   
                                done <- true
                                defer close(done)
   
   ### Describe Alternatives You've Considered
   
                                done <- true
                                defer close(done)
   
   ### Additional Context
   
   _No response_


-- 
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