From 3d9dbe8b593bdc0dda9decb683834dcb6f5fcc90 Mon Sep 17 00:00:00 2001 From: Mark Kogan Date: Tue, 5 Mar 2024 16:48:56 +0200 Subject: [PATCH] rgw/beast: enablment of SSL session-id reuse speedup mechanism Enable the OpenSSL session-id reuse acceleration mechanism that is described in: https://www.openssl.org/docs/man1.0.2/man3/SSL_CTX_set_session_id_context.html SSL_CTX_set_session_id_context, SSL_set_session_id_context - set context within which session can be reused (server side only) Fixes: https://tracker.ceph.com/issues/64719 Signed-off-by: Mark Kogan (cherry picked from commit 6fb4c5d0c0694c9cfdbf0ed729d9f95886a0673f) --- src/rgw/rgw_asio_frontend.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rgw/rgw_asio_frontend.cc b/src/rgw/rgw_asio_frontend.cc index 633a2963300f6..d84264a0a4d05 100644 --- a/src/rgw/rgw_asio_frontend.cc +++ b/src/rgw/rgw_asio_frontend.cc @@ -1036,10 +1036,10 @@ void AsioFrontend::accept(Listener& l, boost::system::error_code ec) handle_connection(context, env, stream, timeout, header_limit, conn->buffer, true, pause_mutex, scheduler.get(), uri_prefix, ec, yield); - if (!ec) { - // ssl shutdown (ignoring errors) - stream.async_shutdown(yield[ec]); - } + + // ssl shutdown (ignoring errors) + stream.async_shutdown(yield[ec]); + conn->socket.shutdown(tcp::socket::shutdown_both, ec); }, make_stack_allocator()); } else { -- 2.39.5