diff options
author | Mark Kogan <mkogan@redhat.com> | 2024-04-30 13:20:54 +0200 |
---|---|---|
committer | Mark Kogan <mkogan@redhat.com> | 2024-04-30 13:20:54 +0200 |
commit | bd1a0064b4915e3b27292dc49dbc5e81ef6fc973 (patch) | |
tree | 9a4c131f6e11499ddf40ce799f04d66f9bb40e1e /src/rgw/rgw_asio_frontend.cc | |
parent | Merge pull request #56942 from Svelar/fix_tox_cephadm (diff) | |
download | ceph-bd1a0064b4915e3b27292dc49dbc5e81ef6fc973.tar.xz ceph-bd1a0064b4915e3b27292dc49dbc5e81ef6fc973.zip |
rgw/beast: fix crash observed in SSL stream.async_shutdown()
Fixes: https://tracker.ceph.com/issues/65664
Signed-off-by: Mark Kogan <mkogan@redhat.com>
Diffstat (limited to 'src/rgw/rgw_asio_frontend.cc')
-rw-r--r-- | src/rgw/rgw_asio_frontend.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/rgw/rgw_asio_frontend.cc b/src/rgw/rgw_asio_frontend.cc index 49b69614b0a..8c64570287d 100644 --- a/src/rgw/rgw_asio_frontend.cc +++ b/src/rgw/rgw_asio_frontend.cc @@ -1043,9 +1043,11 @@ void AsioFrontend::accept(Listener& l, boost::system::error_code ec) conn->buffer, true, pause_mutex, scheduler.get(), uri_prefix, ec, yield); - // ssl shutdown (ignoring errors) - stream.async_shutdown(yield[ec]); - + if (!ec || ec == http::error::end_of_stream) { + // ssl shutdown (ignoring errors) + stream.async_shutdown(yield[ec]); + } + conn->socket.shutdown(tcp::socket::shutdown_both, ec); }, make_stack_allocator()); } else { |