From 8554742131852bd21c2a20da73ac9eeba29900cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20Fern=C3=A1ndez=20Garc=C3=ADa-Minguill?= =?UTF-8?q?=C3=A1n?= Date: Mon, 4 Aug 2025 10:45:47 +0200 Subject: [PATCH] Avoid send close in ssl connections --- lib/MySQL_Monitor.cpp | 2 +- lib/mysql_connection.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/MySQL_Monitor.cpp b/lib/MySQL_Monitor.cpp index e324f4278..dc63c1a99 100644 --- a/lib/MySQL_Monitor.cpp +++ b/lib/MySQL_Monitor.cpp @@ -182,7 +182,7 @@ static int wait_for_mysql(MYSQL *mysql, int status) { } static void close_mysql(MYSQL *my) { - if (my->net.pvio) { + if (my->net.pvio && !my->options.use_ssl) { char buff[5]; mysql_hdr myhdr; myhdr.pkt_id=0; diff --git a/lib/mysql_connection.cpp b/lib/mysql_connection.cpp index 0e5367edf..d58a29f97 100644 --- a/lib/mysql_connection.cpp +++ b/lib/mysql_connection.cpp @@ -2958,7 +2958,7 @@ void MySQL_Connection::optimize() { // if avoids that a QUIT command stops forever // FIXME: currently doesn't support encryption and compression void MySQL_Connection::close_mysql() { - if ((send_quit) && (mysql->net.pvio) && ret_mysql) { + if ((send_quit) && (mysql->net.pvio) && ret_mysql && !mysql->options.use_ssl) { char buff[5]; mysql_hdr myhdr; myhdr.pkt_id=0;