diff options
author | msvensson@pilot.mysql.com <> | 2006-12-22 00:05:40 +0100 |
---|---|---|
committer | msvensson@pilot.mysql.com <> | 2006-12-22 00:05:40 +0100 |
commit | 945c35eee9654f317c179d3ba9edbc72d604ff17 (patch) | |
tree | 9748c21982975c12fc7e4a8247359f55f0e8de56 /vio | |
parent | ad0d8025306c8c39b1156f02dc78b0bc8fd1b91e (diff) | |
download | mariadb-git-945c35eee9654f317c179d3ba9edbc72d604ff17.tar.gz |
Bug#24148 regression tests hang with SSL enabled
- Don't call SSL_shutdown a second time
Diffstat (limited to 'vio')
-rw-r--r-- | vio/viossl.c | 14 |
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))); |