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: testing/wip-vshankar-testing-20241219.063429-debug~49^2~5 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=331b5ea322537d380996ac6b250898ba474500be;p=ceph-ci.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 --- diff --git a/src/librbd/migration/HttpClient.cc b/src/librbd/migration/HttpClient.cc index 5ad962485b1..4d94b1eaf78 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; }