From b79ac1dcea13c23c1077678d1520c9e7b8bd4769 Mon Sep 17 00:00:00 2001 From: Eric Peters Date: Wed, 3 Apr 2019 14:12:22 -0700 Subject: [PATCH] Fix for #93590 - ignore javax.net.ssl.SSLException: closing inbound before receiving peer's close_notify on java11+ --- .../java/com/mysql/cj/protocol/a/NativeProtocol.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/protocol-impl/java/com/mysql/cj/protocol/a/NativeProtocol.java b/src/main/protocol-impl/java/com/mysql/cj/protocol/a/NativeProtocol.java index eac18f51c..f234013b0 100644 --- a/src/main/protocol-impl/java/com/mysql/cj/protocol/a/NativeProtocol.java +++ b/src/main/protocol-impl/java/com/mysql/cj/protocol/a/NativeProtocol.java @@ -1322,7 +1322,13 @@ public final void quit() { } } } catch (IOException ioEx) { - this.log.logWarn("Caught while disconnecting...", ioEx); + // See https://bugs.mysql.com/bug.php?id=93590 + // Inspired by: https://github.com/netty/netty/issues/1340 + // This is a java11 "bug", so don't log it + String msg = ioEx.getMessage(); + if (msg == null || !msg.contains("closing inbound before receiving peer's close_notify")) { + this.log.logWarn("Caught while disconnecting...", ioEx); + } } this.packetSequence = -1;