Eliminate confusion by moving auth from active_con into MonClient
instead of swapping them.
The existing MonClient::auth can be destroyed right away -- I don't
see why active_con would need it or a reason to delay its destruction
(which is what stashing in active_con effectively does).
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit
eec24e4d119c57c7eb5119dc0083616a61b33b89)
_resend_mon_commands();
send_log(true);
if (active_con) {
- std::swap(auth, active_con->get_auth());
+ auth = std::move(active_con->get_auth());
if (global_id && global_id != active_con->get_global_id()) {
lderr(cct) << __func__ << " global_id changed from " << global_id
<< " to " << active_con->get_global_id() << dendl;