zstan commented on a change in pull request #8824:
URL: https://github.com/apache/ignite/pull/8824#discussion_r594902880
##########
File path:
modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
##########
@@ -4217,6 +4217,32 @@ public static void close(@Nullable AutoCloseable rsrc,
@Nullable IgniteLogger lo
}
}
+ /**
+ * Closes given socket logging possible checked exception.
+ *
+ * @param sock Socket to close. If it's {@code null} - it's no-op.
+ * @param log Logger to log possible checked exception with (optional).
+ */
+ public static void close(@Nullable Socket sock, @Nullable IgniteLogger
log) {
+ if (sock != null) {
+ try {
+ //avoid tls 1.3 incompatibility
https://bugs.openjdk.java.net/browse/JDK-8208526
+ sock.shutdownOutput();
+ sock.shutdownInput();
+ }
+ catch (Exception e) {
+ warn(log, "Failed to close socket: " + e.getMessage(), e);
Review comment:
done
----------------------------------------------------------------
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]