Commit fd988f5b authored by unknown's avatar unknown

Bug#24148 regression tests hang with SSL enabled

 - Don't call SSL_shutdown a second time


vio/viossl.c:
  SSL_shutdown might return 0 indicating that it should be called once
  again for a graceful shutdown. Since the socket are going to be closed
  anyway ther is no need for the second call.
parent 10125425
......@@ -126,12 +126,16 @@ int vio_ssl_close(Vio *vio)
{
switch ((r= SSL_shutdown(ssl)))
{
case 1: /* Shutdown successful */
case 1:
/* Shutdown successful */
break;
case 0: /* Shutdown not yet finished, call it again */
if ((r= SSL_shutdown(ssl) >= 0))
case 0:
/*
Shutdown not yet finished - since the socket is going to
be closed there is no need to call SSL_shutdown() a second
time to wait for the other side to respond
*/
break;
/* Fallthrough */
default: /* Shutdown failed */
DBUG_PRINT("vio_error", ("SSL_shutdown() failed, error: %d",
SSL_get_error(ssl, r)));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment