]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/mon: s/send_pendings/on_session_opened/
authorKefu Chai <kchai@redhat.com>
Tue, 2 Mar 2021 08:23:20 +0000 (16:23 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 2 Mar 2021 11:04:28 +0000 (19:04 +0800)
will use this method also for sending requests which are not acked

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

index f623ac2cac94ece16f561c5daf83647b05a110d8..06c08dfdf12a1fd1a3f2f889473849037a6a8ac8 100644 (file)
@@ -513,10 +513,10 @@ void Client::ms_handle_reset(crimson::net::ConnectionRef conn, bool /* is_replac
       logger().warn("active conn reset {}", conn->get_peer_addr());
       active_con.reset();
       return reopen_session(-1).then([this] {
-       if (active_con) {
-         send_pendings();
-       }
-       return seastar::now();
+        if (active_con) {
+          on_session_opened();
+        }
+        return seastar::now();
       });
     } else {
       return seastar::now();
@@ -757,7 +757,7 @@ seastar::future<> Client::handle_monmap(crimson::net::ConnectionRef conn,
     logger().warn("mon.{} went away", cur_mon);
     return reopen_session(-1).then([this] {
       if (active_con) {
-        send_pendings();
+        on_session_opened();
       }
       return seastar::now();
     });
@@ -878,7 +878,7 @@ seastar::future<> Client::authenticate()
 {
   return reopen_session(-1).then([this] {
     if (active_con) {
-      send_pendings();
+      on_session_opened();
     }
     return seastar::now();
   });
@@ -1019,7 +1019,7 @@ seastar::future<> Client::send_message(MessageRef m)
   }
 }
 
-void Client::send_pendings()
+void Client::on_session_opened()
 {
   for (auto& m : pending_messages) {
     (void) active_con->get_conn()->send(m.msg);
index 7e13846039b0ce3aa94beb833a969c5e2f70aac3..549b407dc9c91a9984e6137454952434d731e2a0 100644 (file)
@@ -155,7 +155,7 @@ private:
   seastar::future<> handle_log_ack(Ref<MLogAck> m);
   seastar::future<> handle_config(Ref<MConfig> m);
 
-  void send_pendings();
+  void on_session_opened();
 private:
   seastar::future<> load_keyring();
   seastar::future<> authenticate();