diff options
author | Ilya Dryomov <idryomov@gmail.com> | 2024-12-06 14:42:55 +0100 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2024-12-13 13:44:44 +0100 |
commit | 5699e4b871c66035c2c425bc9de7022fa2474c78 (patch) | |
tree | 13b7974cd183031cb3abed0528b95c29c75b1d05 | |
parent | librbd/migration/HttpClient: fix some error messages in handle_receive() (diff) | |
download | ceph-5699e4b871c66035c2c425bc9de7022fa2474c78.tar.xz ceph-5699e4b871c66035c2c425bc9de7022fa2474c78.zip |
librbd/migration/HttpClient: don't shut down socket in resolve_host()
resolve_host() is called from init() and issue() when transitioning out
of STATE_UNINITIALIZED and from advance_state() right after the call to
shutdown_socket(). In all three cases the socket should get closed, so
drop the redundant call and place asserts in connect() implementations
instead.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
-rw-r--r-- | src/librbd/migration/HttpClient.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librbd/migration/HttpClient.cc b/src/librbd/migration/HttpClient.cc index 463962befba..dbe7a16416c 100644 --- a/src/librbd/migration/HttpClient.cc +++ b/src/librbd/migration/HttpClient.cc @@ -229,7 +229,6 @@ private: auto cct = m_http_client->m_cct; ldout(cct, 15) << dendl; - shutdown_socket(); m_resolver.async_resolve( m_http_client->m_url_spec.host, m_http_client->m_url_spec.port, [this, on_finish](boost::system::error_code ec, auto results) { @@ -601,6 +600,7 @@ protected: auto cct = http_client->m_cct; ldout(cct, 15) << dendl; + ceph_assert(!m_stream.socket().is_open()); m_stream.async_connect( results, [on_finish](boost::system::error_code ec, const auto& endpoint) { @@ -645,6 +645,7 @@ protected: auto cct = http_client->m_cct; ldout(cct, 15) << dendl; + ceph_assert(!boost::beast::get_lowest_layer(m_stream).socket().is_open()); boost::beast::get_lowest_layer(m_stream).async_connect( results, [this, on_finish](boost::system::error_code ec, const auto& endpoint) { |