]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: ssl: Don't forget to call the close method of the underlying xprt.
authorOlivier Houchard <ohouchard@haproxy.com>
Thu, 23 May 2019 16:41:47 +0000 (18:41 +0200)
committerOlivier Houchard <cognet@ci0.org>
Tue, 28 May 2019 08:08:39 +0000 (10:08 +0200)
In ssl_sock_close(), don't forget to call the underlying xprt's close method
if it exists. For now it's harmless not to do so, because the only available
layer is the raw socket, which doesn't have a close method, but that will
change when we implement QUIC.

src/ssl_sock.c

index 5393756c2b3ad1635fc8e886fda7942427cb20b5..2eb344dfaa42524e661b1925d853bad0167f12af 100644 (file)
@@ -5854,6 +5854,8 @@ static void ssl_sock_close(struct connection *conn, void *xprt_ctx) {
        struct ssl_sock_ctx *ctx = xprt_ctx;
 
        if (ctx) {
+               if (ctx->xprt->close)
+                       ctx->xprt->close(conn, ctx->xprt_ctx);
 #if (HA_OPENSSL_VERSION_NUMBER >= 0x1010000fL) && !defined(OPENSSL_NO_ASYNC)
                if (global_ssl.async) {
                        OSSL_ASYNC_FD all_fd[32], afd;