Copilot commented on code in PR #10153: URL: https://github.com/apache/cloudstack/pull/10153#discussion_r2128408909
########## utils/src/main/java/com/cloud/utils/nio/NioClient.java: ########## @@ -79,6 +79,7 @@ protected void init() throws IOException { _selector.close(); throw new IOException("Failed to initialise security", e); } catch (final IOException e) { + _clientConnection.close(); Review Comment: Consider wrapping _clientConnection.close() in a try-catch block to ensure that any exception thrown during the close operation does not obscure the original IOException and to better manage resource cleanup. ```suggestion try { _clientConnection.close(); } catch (final IOException closeException) { logger.error("Failed to close _clientConnection", closeException); } ``` -- 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