From: Ilya Dryomov Date: Sat, 7 Dec 2024 11:22:52 +0000 (+0100) Subject: librbd/migration/HttpClient: don't call disconnect() in handle_handshake() X-Git-Tag: v19.2.1~15^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1e66e09e0f6c0cb3ed3de8ad3d98d61d7bf2a8d8;p=ceph.git librbd/migration/HttpClient: don't call disconnect() in handle_handshake() With m_ssl_enabled set to false, disconnect() is a no-op. Since m_ssl_enabled is flipped to true only when the handshake succeeds, calling disconnect() on "failed to complete handshake" error is bogus (as would be attempting to shut down SSL there). Signed-off-by: Ilya Dryomov (cherry picked from commit 331b5ea322537d380996ac6b250898ba474500be) --- diff --git a/src/librbd/migration/HttpClient.cc b/src/librbd/migration/HttpClient.cc index 5ad962485b1c..4d94b1eaf787 100644 --- a/src/librbd/migration/HttpClient.cc +++ b/src/librbd/migration/HttpClient.cc @@ -757,8 +757,7 @@ private: if (r < 0) { lderr(cct) << "failed to complete handshake: " << cpp_strerror(r) << dendl; - disconnect(new LambdaContext([r, on_finish](int) { - on_finish->complete(r); })); + on_finish->complete(r); return; }