]> 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)
committerKefu Chai <kchai@redhat.com>
Fri, 5 May 2017 01:50:47 +0000 (09:50 +0800)
instead of doing it manually.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/mon/Elector.cc

index c3c8fd8845f43c7a2f2698f4ccf85611fe38c57d..c2da8bbb40d2502701ccd65976c372d543beb970 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)