]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mon/MonClient: cancel pending commands on shutdown
authorKefu Chai <kchai@redhat.com>
Tue, 23 May 2017 08:54:57 +0000 (16:54 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 24 May 2017 15:58:25 +0000 (23:58 +0800)
Fixes: http://tracker.ceph.com/issues/20051
Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/mon/MonClient.cc

index b926076961c027d97177763750d6584da4e1278d..73d1a110d0241c9e1b410c55c211c643eea50415 100644 (file)
@@ -408,7 +408,10 @@ void MonClient::shutdown()
     delete version_requests.begin()->second;
     version_requests.erase(version_requests.begin());
   }
-
+  while (!mon_commands.empty()) {
+    auto tid = mon_commands.begin()->first;
+    _cancel_mon_command(tid);
+  }
   while (!waiting_for_session.empty()) {
     ldout(cct, 20) << __func__ << " discarding pending message " << *waiting_for_session.front() << dendl;
     waiting_for_session.front()->put();