From: Mark Kogan Date: Tue, 5 Mar 2024 14:48:56 +0000 (+0200) Subject: rgw/beast: enablment of SSL session-id reuse speedup mechanism X-Git-Tag: v20.0.0~2453^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F55967%2Fhead;p=ceph.git 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 --- diff --git a/src/rgw/rgw_asio_frontend.cc b/src/rgw/rgw_asio_frontend.cc index 42ad1206148..49b69614b0a 100644 --- a/src/rgw/rgw_asio_frontend.cc +++ b/src/rgw/rgw_asio_frontend.cc @@ -1042,10 +1042,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 {