While we are shutting down, we should drop all subsequent mon
messages. Currently it is possible to finish the authentication
sequence *while* we are shutting down, such that a subsequent
attempt to authenticate succeeds.
Fix this by resetting cur_con early in the sequence, as this
makes us drop all incoming messages.
Fixes: http://tracker.ceph.com/issues/13992
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit
5b44a348bfe4978446bbc7acf58eb8f60a47c965)
waiting_for_session.pop_front();
}
+ if (cur_con)
+ cur_con->mark_down();
+ cur_con.reset(NULL);
+ cur_mon.clear();
+
monc_lock.Unlock();
if (initialized) {
monc_lock.Lock();
timer.shutdown();
- if (cur_con)
- cur_con->mark_down();
- cur_con.reset(NULL);
- cur_mon.clear();
-
monc_lock.Unlock();
}