squakez commented on code in PR #20113:
URL: https://github.com/apache/camel/pull/20113#discussion_r2580469640


##########
components/camel-rest/src/main/java/org/apache/camel/component/rest/RestProducer.java:
##########
@@ -265,6 +266,7 @@ protected void doStart() throws Exception {
     protected void doStop() throws Exception {
         super.doStop();
         ServiceHelper.stopService(producer, binding);
+        producer.close();

Review Comment:
   No, Sonar is not complaining about this because the object was a 
`AsyncProcessor`. I've gone through it and the `producer` object is not closed 
because it's an object of the RestProducer class, so we must close it when this 
class is stopped I guess. Otherwise any resource opened in the `producer` will 
be maintained opened (hence the possible leak) now that is is indeed an 
`AsyncProducer`.



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