summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2024-12-07 12:22:52 +0100
committerIlya Dryomov <idryomov@gmail.com>2024-12-13 13:44:44 +0100
commit331b5ea322537d380996ac6b250898ba474500be (patch)
treea21be7a7d319105b1bc8fe257765120fb680802a
parentlibrbd/migration/HttpClient: avoid reusing ssl_stream after shut down (diff)
downloadceph-331b5ea322537d380996ac6b250898ba474500be.tar.xz
ceph-331b5ea322537d380996ac6b250898ba474500be.zip
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 <idryomov@gmail.com>
-rw-r--r--src/librbd/migration/HttpClient.cc3
1 files changed, 1 insertions, 2 deletions
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;
}