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)
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;
}