Copilot commented on code in PR #10879:
URL: https://github.com/apache/cloudstack/pull/10879#discussion_r2092590854


##########
services/secondary-storage/server/src/main/java/org/apache/cloudstack/storage/resource/HttpUploadServerHandler.java:
##########
@@ -229,8 +230,15 @@ public void channelRead0(ChannelHandlerContext ctx, 
HttpObject msg) throws Excep
     private void reset() {
         request = null;
         // destroy the decoder to release all resources
-        decoder.destroy();
-        decoder = null;
+        if (decoder != null) {
+            try {
+                decoder.destroy();
+            } catch (IllegalReferenceCountException e) {
+                logger.warn("Decoder already destroyed", e);

Review Comment:
   [nitpick] If encountering an already destroyed decoder is an expected 
scenario, consider providing additional context in the log message or lowering 
the log level to DEBUG to reduce noise in production logs.



-- 
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: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to