Skip to content

Commit

Permalink
Merge pull request #4555 from joshuahunt/johunt/clear-ssl-error-queue…
Browse files Browse the repository at this point in the history
…-on-shutdown

Clear SSL error queue on shutdown
  • Loading branch information
JavierJF authored May 24, 2024
2 parents f7c0382 + 2e4ef16 commit 7ec6e14
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/mysql_data_stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,8 @@ MySQL_Data_Stream::~MySQL_Data_Stream() {
// other part, we perform a 'quiet' shutdown. For more context see
// MYSQL #29579.
SSL_set_quiet_shutdown(ssl, 1);
SSL_shutdown(ssl);
if (SSL_shutdown(ssl) < 0)
ERR_clear_error();
}
if (ssl) SSL_free(ssl);
}
Expand Down Expand Up @@ -515,7 +516,8 @@ void MySQL_Data_Stream::shut_hard() {
// other part, we perform a 'quiet' shutdown. For more context see
// MYSQL #29579.
SSL_set_quiet_shutdown(ssl, 1);
SSL_shutdown(ssl);
if (SSL_shutdown(ssl) < 0)
ERR_clear_error();
}
if (fd >= 0) {
shutdown(fd, SHUT_RDWR);
Expand Down

0 comments on commit 7ec6e14

Please sign in to comment.