]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: unify connected() and is_connected() of Watch.
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Fri, 29 Nov 2019 18:16:48 +0000 (19:16 +0100)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Thu, 13 Feb 2020 23:11:39 +0000 (00:11 +0100)
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/osd/Watch.cc
src/osd/Watch.h

index 4e13887e7ba3a45cdb3a9a28183b4f3d3c899b36..28d24d976eaf7de99e45e574a882015409b71938 100644 (file)
@@ -308,8 +308,6 @@ Watch::~Watch() {
   ceph_assert(!conn);
 }
 
-bool Watch::connected() { return !!conn; }
-
 Context *Watch::get_delayed_cb()
 {
   ceph_assert(!cb);
@@ -460,7 +458,7 @@ void Watch::start_notify(NotifyRef notif)
   dout(10) << "start_notify " << notif->notify_id << dendl;
   in_progress_notifies[notif->notify_id] = notif;
   notif->start_watcher(self.lock());
-  if (connected())
+  if (is_connected())
     send_notify(notif);
 }
 
index 3d3b09fd772234a587c32f609ad509527131e2bf..8d6d93a7d1c778e768af394a9892aa0d99a7570c 100644 (file)
@@ -192,6 +192,7 @@ public:
     return last_ping;
   }
 
+  /// True if currently connected
   bool is_connected() const {
     return conn.get() != NULL;
   }
@@ -227,9 +228,6 @@ public:
   /// Generates context for use if watch timeout is delayed by scrub or recovery
   Context *get_delayed_cb();
 
-  /// True if currently connected
-  bool connected();
-
   /// Transitions Watch to connected, unregister_cb, resends pending Notifies
   void connect(
     ConnectionRef con, ///< [in] Reference to new connection