]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/Elector: call cancel_timer() in shutdown()
authorKefu Chai <kchai@redhat.com>
Thu, 4 May 2017 14:49:04 +0000 (22:49 +0800)
committerAlexey Sheplyakov <asheplyakov@mirantis.com>
Tue, 20 Jun 2017 14:18:20 +0000 (18:18 +0400)
instead of doing it manually.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 12139ae529a49b6caedea89f910d034ddca094b6)

src/mon/Elector.cc

index 7bf552a86f5975368c78c5b6f3c498563c3fc8d8..c2c26b039b918a0175cc533ec78ce17b21314524 100644 (file)
@@ -42,8 +42,7 @@ void Elector::init()
 
 void Elector::shutdown()
 {
-  if (expire_event)
-    mon->timer.cancel_event(expire_event);
+  cancel_timer();
 }
 
 void Elector::bump_epoch(epoch_t e)