diff --git a/src/mon/MonClient.cc b/src/mon/MonClient.cc index dc1ec6c4a7b..2ab6174e362 100644 --- a/src/mon/MonClient.cc +++ b/src/mon/MonClient.cc @@ -426,6 +426,11 @@ void MonClient::shutdown() waiting_for_session.pop_front(); } + if (cur_con) + cur_con->mark_down(); + cur_con.reset(NULL); + cur_mon.clear(); + monc_lock.Unlock(); if (initialized) { @@ -434,11 +439,6 @@ void MonClient::shutdown() monc_lock.Lock(); timer.shutdown(); - if (cur_con) - cur_con->mark_down(); - cur_con.reset(NULL); - cur_mon.clear(); - monc_lock.Unlock(); }