]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd/migration/HttpClient: don't call disconnect() in handle_handshake()
authorIlya Dryomov <idryomov@gmail.com>
Sat, 7 Dec 2024 11:22:52 +0000 (12:22 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 16 Dec 2024 08:51:21 +0000 (09:51 +0100)
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 <idryomov@gmail.com>
(cherry picked from commit 331b5ea322537d380996ac6b250898ba474500be)

src/librbd/migration/HttpClient.cc

index 5ad962485b1c57b35f95f8b023df890433b61e52..4d94b1eaf787ec36c85ac237132816b7c75ff497 100644 (file)
@@ -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;
     }