Merge pull request #5096 from Gonlo2/fix-close-ssl-con

Avoid send close in ssl connections
pull/5054/merge
René Cannaò 3 months ago committed by GitHub
commit 27f13ca18d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -185,7 +185,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;

@ -2979,7 +2979,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;

Loading…
Cancel
Save