]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/MonClient: ensure !cur_con == cur_mon.empty()
authorSage Weil <sage@redhat.com>
Fri, 15 Aug 2014 22:30:30 +0000 (15:30 -0700)
committerJohn Spray <john.spray@redhat.com>
Mon, 25 Aug 2014 00:34:19 +0000 (01:34 +0100)
Keep these in sync.

Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/MonClient.cc

index 0c64e93bb687efc754a7b53eacb4b7fbf189780f..46ffa5c8508be473abf84b0c77289c884f67e01b 100644 (file)
@@ -153,6 +153,7 @@ int MonClient::get_monmap_privately()
     if (cur_con) {
       cur_con->mark_down();
       cur_con.reset(NULL);
+      cur_mon.clear();
     }
     monc_lock.Unlock();
     messenger->shutdown();
@@ -165,7 +166,6 @@ int MonClient::get_monmap_privately()
 
   hunting = true;  // reset this to true!
   cur_mon.clear();
-
   cur_con.reset(NULL);
 
   if (!monmap.fsid.is_zero())
@@ -424,6 +424,7 @@ void MonClient::shutdown()
   if (cur_con)
     cur_con->mark_down();
   cur_con.reset(NULL);
+  cur_mon.clear();
 
   monc_lock.Unlock();
 }