summaryrefslogtreecommitdiff
path: root/vio/viossl.c
diff options
context:
space:
mode:
authorunknown <msvensson@pilot.mysql.com>2006-12-22 00:05:40 +0100
committerunknown <msvensson@pilot.mysql.com>2006-12-22 00:05:40 +0100
commitfd988f5b9aeb75d177544c9f525bfbac10ee1901 (patch)
tree9748c21982975c12fc7e4a8247359f55f0e8de56 /vio/viossl.c
parent10125425901de807e91faab897fdc08c38f7de23 (diff)
downloadmariadb-git-fd988f5b9aeb75d177544c9f525bfbac10ee1901.tar.gz
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.
Diffstat (limited to 'vio/viossl.c')
-rw-r--r--vio/viossl.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/vio/viossl.c b/vio/viossl.c
index f436262a3ce..806f6fc356a 100644
--- a/vio/viossl.c
+++ b/vio/viossl.c
@@ -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 - 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;
- case 0: /* Shutdown not yet finished, call it again */
- if ((r= SSL_shutdown(ssl) >= 0))
- break;
- /* Fallthrough */
default: /* Shutdown failed */
DBUG_PRINT("vio_error", ("SSL_shutdown() failed, error: %d",
SSL_get_error(ssl, r)));