michaeljmarshall opened a new pull request, #1070:
URL: https://github.com/apache/pulsar-client-go/pull/1070

   ### Motivation
   
   When a consumer fails to get created, we should close any resources that it 
created to prevent leaks of internal resources and leaks of the consumer on the 
broker side. The broker leak could happen if the connection was left open. 
These fixes are similar to #1061.
   
   ### Modifications
   
   * Close `ackGroupingTracker` and `chunkedMsgCtxMap` if `grabConn` fails. We 
cannot call `Close` on the consumer because the state is not `Ready`. If we 
re-design the consumer, it could be nice to be able to call `Close` in this 
scenario.
   * Call `Close` on the consumer in cases where we move it to `Ready` but 
determine it is not able to be created.
   * Fix typo in comment
   
   ### Verifying this change
   
   This is a trivial change.
   


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