freeznet commented on a change in pull request #154: [Issue #153] Fix handler 
memory leak
URL: https://github.com/apache/pulsar-client-go/pull/154#discussion_r366124434
 
 

 ##########
 File path: pulsar/consumer_impl.go
 ##########
 @@ -317,6 +319,7 @@ func (c *consumer) Close() {
                wg.Wait()
                close(c.closeCh)
        })
+       c.client.handlers.Del(c)
 
 Review comment:
   the initial thought was `delete` operation will be no-op if 
consumer/producer not in handlers, so i didnt put `Del` call in the 
`closeOnce`. But your idea is better, which will prevent non necessary 
locks&unlocks.   

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


With regards,
Apache Git Services

Reply via email to