You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "nizhikov (via GitHub)" <gi...@apache.org> on 2024/10/29 21:01:12 UTC

Re: [PR] IGNITE-23535 Fix IgniteUtilsUnitTest.shouldNotProduceWarningsWhenClosingAnAlreadyClosedSocket [ignite]

nizhikov commented on code in PR #11625:
URL: https://github.com/apache/ignite/pull/11625#discussion_r1821527419


##########
modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java:
##########
@@ -4364,6 +4364,9 @@ public static void close(@Nullable AutoCloseable rsrc, @Nullable IgniteLogger lo
     public static void close(@Nullable Socket sock, @Nullable IgniteLogger log) {
         if (sock == null)
             return;
+        
+        if (sock.isClosed())

Review Comment:
   Let's minify it even more:
   
   ```
   if (sock == null || sock.isClosed())
       return;
   ```
   
   



-- 
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: notifications-unsubscribe@ignite.apache.org

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